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 "); ?>
10) $cols = 5; { $colwidth = round(100 / $cols); } while ($r = $db->fetch_array()) { if ($i == $cols) { echo ""; $i = 0; } if ($i == 0) { echo ""; } $image = getImage('/ranks/'.$r['image'].'_small'); $link = '"; if ($image) { $imagestring = ''.$r['image'].''; } else { $imagestring = 'Player List'; } $achvd = ''; if ($ranks[$r['rankId']] > 0) { $imagestring = "$link$imagestring"; $achvd = 'Achieved by '.$ranks[$r['rankId']].' Players'; } echo "'; $i++; } if ($i != 0) { for ($i = $i; $i < $cols; $i++) { echo ''; } echo ''; } ?>
" .''.$r['rankName'].'
' .'('.$r['minKills'].'-'.$r['maxKills'].' kills)'.'
' ."$achvd
" .$imagestring.'