View Single Post
  #6 (permalink)  
Old 19-01-2004, 05:56 PM
sufyan sufyan is offline
Senior Webmaster
 
Join Date: Oct 2001
Location: Melbourne, AU
Posts: 456
Rep Power: 97
sufyan is on a distinguished road
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.
Reply With Quote