[snip] However, why not just SUM all the rows in the table in the query if you just want a total?
$sql_2 = "SELECT SUM(partpaidamount) as partpaid FROM $tb_name"; [/snip] That is what he is doing. The SELECT SUM will only return ONE row! I am not sure that the problem is being explained clearly though. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php