I have a table that I want to calculate the sum total of all the values in column \"Price\"
mysql_connect($hostname, $username, $password); mysql_select_db($db); $sql = "select sum(column) from table"; $q = mysql_query($sql); $row = mysql_fetch_array($q); echo 'Sum: ' . $row[0];
Replace variable names and table/column names as needed.