[SOLVED] sum()
Posted: Sat Jun 19, 2004 3:31 pm
Is the result of a sum query put into the var of that column? Ive been trying this for a while and its not outputting anything:
Thanks
Code: Select all
<?php
mysql_pconnect("localhost","User","Pass");
mysql_select_db("douple_Newdata");
$query = "SELECT sum(Downloads) from affmembers";
$result = mysql_query($query)
or die ("Couldn't execute query.");
$row = mysql_fetch_array($result,MYSQL_ASSOC);
extract($row);
echo "$Downloads";
?>