id and validate_state=0"); $sum = 0; start_table(); echo "Result IDClaimed credit\n"; while ($result = mysql_fetch_object($res)) { if ($result->claimed_credit > 0) { echo "id>$result->id",format_credit($result->claimed_credit), "\n"; $sum += $result->claimed_credit; } } end_table(); echo "Pending credit: ",format_credit($sum); page_tail(); ?>