Hello,
I am using the code below to print the sum of all the ListPrice values returned from the query. When I SSH into my server and run the query in MySQL it works just fine (replacing $id with a real value). However, my code below will not print out anything.
I am using PHP4, MySQL4 and the PEAR DB module.
Any help would be greatly appreciated.
Thanks in advance!
$TotalSql = "SELECT sum(ListPrice) FROM residential WHERE ListAgentId='$id'";
$TotalRow = $db->query($TotalSql);
echo "<tr><td>Total:</td><td colspan=\"2\">".$TotalRow['sum(ListPrice)']."</td></tr>";