What I want is the most popular section to be echoed and the number of times it has been selected. The quantity works but no section name is displayed.
$section_data = mysql_query("SELECT fav_section, COUNT(fav_section) AS most_popular FROM cms_users GROUP BY fav_section ORDER BY most_popular DESC LIMIT 1");
$row = mysql_fetch_assoc($section_data);
echo '<font color ="#FF3300">' . $row[fav_section] . ' - ' . $row[most_popular] . ' votes</font>';
Can anyone see anything wrong with this code?
(I posted this in the PHP forum with no response, and decided this would be a better suited place to ask)