i suppose the db looks like that:
table numbers
field value:
5
7
12
65
23
...
$query = "SELECT value FROM numbers";
$result = mysql_query($query);
$total = mysql_num_rows($result);
while ($row = mysql_fetch_array($result)) {
$sum += $row[0];
}
$percent = sprintf("%0.2f", $sum/$count);
print "$percent" . "%";
i hope thats what you wanted - i didnt get the percentage part 100%... hehe - WHAT do you want the percentage of? right now it calculates the average value of the values in the table and prints it with 2 digits after the comma...