Forum Moderators: coopster
at the moment I am trying:
$sql="SELECT SUM($counter) FROM milton";
$mysql_result=mysql_query($sql,$connection);
echo "$mysql_result";
but am gettin nothing....
any ideas?
$sql="SELECT SUM($counter) FROM milton";
change $counter to counter and test again. that might be the solution. don't mix sql with php vars that way ;).
- hakre
$array = mysql_fetch_array($mysql_result);
echo $array[0]; this piece of code should output the SUM in your query.
-hakre