[snip] ----CODE Begin----------------- $sql_2 = "SELECT SUM(paidamount) as paid FROM $tb_name WHERE id = \"$id\" ";
$result_2 = @mysql_query($sql_2,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($result_2)) { $paid = $row['paid']; } ----CODE End----------------- [/snip] FOUND IT! ----CODE Begin----------------- $sql_2 = "SELECT paidamount FROM $tb_name WHERE id = \"$id\" "; $result_2 = @mysql_query($sql_2,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($result_2)) { $paid = $row['paidamount']; $total = $total + $paid; } ----CODE End----------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php