Forum Moderators: coopster
$query1 = "SELECT status, COUNT(status) AS counted FROM {table} GROUP BY status ORDER BY status";
$result1 = mysql_query($query1) or die(mysql_error().'<p>'.$query1.'</p>');
while ($myrow1 = mysql_fetch_array($result1))
{
echo "Total Status of ".$myrow1['status']." = ".$myrow1['counted']."<br>";
}
This should give you something like:
Total Status of 0 = 15
Total Status of 1 = 57
Total Status of 2 = 2