OK. Still stuck on this. Here's my code now...
$query = "SELECT countries, sum(count) AS totalCount ".
"FROM statistics ".
"GROUP BY countries";
$result = mysql_query($query) or die(mysql_error());
$num_results = mysql_num_rows($result);
$count = 0;
for($i=0; $i<=$num_results; $i++)
{
$count += $row['totalCount'];
}
echo '<p>Total Number of Participants: '.$count.'</p>';
It displays 0 when it should display 4
I want to get the total i.e. add each value in each row together.
How do I do this?