Ic,
for this example we will have 2 fields:
Name (abu, ali, etc.) and
Number (5,9, etc.)
The easiest way is to do something like the following:
PHP Code:
$final = 0;
$db = ... ;
$sql = mysql_query("SELECT * FROM table WHERE Name='abu'");
while ($output = mysql_fetch_array($sql)) {
$final = $final + $output['Number'];
}
echo $final;
I haven't tested the code, but i'm quite sure it should work.