High Scores';
$q = "select * from scores where game = '$game_id' order by score desc limit 20";
$q = "select score, users.user_name username from scores inner join users on users.user_id=scores.user_id where game = '$game_id' order by score desc limit 20";
$r = $db->query($q);
echo '';
echo '
Rank |
User Name |
Score |
';
$rank = 0;
while($row = $r->fetchArray())
{
$rank ++;
echo '';
echo '' . $rank . ' | ';
echo '' . $row['username'] . ' | ';
echo '' . $row['score'] . ' | ';
echo '
';
}
echo '
';