I'm new at this so don't laugh! Ok you can laugh a little . . .
I want to sum up the values in a column called amount which is in a table called ref38. Here is what I have so far . . .
$query = "SELECT SUM(amount) FROM ref39 ";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
is that right to total up the values in the column named amount from the table named ref39?
what php do i need, to add the result of the sum to a variable eg:
$sumresult = what goes here? so I can then do print to the browser:
echo "$sumresult";
Does that make sense??
Thanks in advance!
Gavin