I'm trying to count the number of entries in the 'classcode' column of my db which have 'class1' as the value and then convert this number into a PHP variable. Any ideas where I'm going wrong? Any help much appreciated
$result = mysql_query("SELECT COUNT(classcode) FROM playerinfo WHERE classcode='class1'");
$count = mysql_result($result, 0);
echo $count;