i have got to the stage where i can display a count of how many entries are in each category. It echo's the data like this
There are 6 in the category number1
There are 4 in the category number2
There are 1 in the category number4
There are 1 in the category number5
There are 1 in the category number8
However all i want is it to show the most popular category. So for instance - the most popular categoryNo is "" with "" entries
Code:
- $count_query_v1 = "SELECT categoryNo, COUNT(entryNo)
FROM entries
GROUP by categoryNo;
";
$answer = mysql_query($count_query_v1) or die(mysql_error());
// Print out result
while($row = mysql_fetch_array($answer)){
echo "There are ". $row['COUNT(entryNo)'] ."in the category number". $row['categoryNo'] ." ;
}
How would i go about this?