query(" SELECT rankName, minKills, rankId, count(playerId) AS obj_count FROM hlstats_Ranks INNER JOIN hlstats_Players ON ( hlstats_Ranks.game=hlstats_Players.game ) WHERE kills>=minKills AND kills<=maxKills AND hlstats_Ranks.game='$game' GROUP BY rankName, minKills "); while ($r = $db->fetch_array()) { $ranks[$r['rankId']] = $r['obj_count']; } // select the available ranks $result = $db->query(" SELECT rankName, minKills, maxKills, rankId, image FROM hlstats_Ranks WHERE hlstats_Ranks.game='$game' ORDER BY minKills "); ?>
"
.''.$r['rankName'].' ' .'('.$r['minKills'].'-'.$r['maxKills'].' kills)'.' ' ."$achvd " .$imagestring.' | ';
$i++;
}
if ($i != 0)
{
for ($i = $i; $i < $cols; $i++)
{
echo ''; } echo ' |