$user = name of the table
producttotal
500
6105
131
$ordertotal = mysql_query("SELECT SUM(producttotal) FROM ".$user['username']."");
echo "Order total: ".$ordertotal;
why is the result "Order total: Resource id #7". I wanted to sum all the values below producttotal column.
Thanks in advance.