I have some php code for pulling results from my database:
<?php $res=mysql_query("SELECT SUM(step_count.steps) as total,
leagues.league_id, leagues.league_name
FROM step_count
INNER JOIN logins on
step_count.email=logins.email
INNER JOIN leagues ON
leagues.email=logins.email
GROUP BY leagues.league_id, leagues.league_name
ORDER BY `total` DESC LIMIT 10");
while ($row = mysql_fetch_array($res))
{
?>
<?php echo $row['league_name']; ?>
<?php echo $row['total']; ?>
And I get the results as wanted which are
Test | 6200
TestTwo | 5600
TestThree | 3400
And I was wondering if there was a way to create rankings for these results so it looks like this without having to manually add the ranks myself
#1 Test | 6200
#2 TestTwo | 5600
#3 TestThree | 3400