I'm trying to get a total SUM of everything in this one table, here is my Table:
date telephone cellphone internet electricity water rent housekeeping maintenance
I can get the individual sums of each column, but I wish to just get a summary of total SUM of all columns combined. I keep getting a mysql_fetch_row(): error.
And here is my Code:
//UTILITIES
$conn = db_connect();
$query = "SELECT SUM(*) from utilities";
$result = mysql_query($query);
list($num_total) = mysql_fetch_row($result);
echo "<TABLE BORDER=0 WIDTH=\"100%\">\n"
."<TR><TD><P CLASS=small>Utilities Totals:</TD></TR>\n"
."<TR><TD><P CLASS=small><font color=blue>".$num_total."</font></TD></TR></TABLE>\n";
Thanks for your help 😃