Hi, Small headache problem with a highscore table.
I have a table that displays a list of highscores. The code pulls the data from the sql table in the correct order highest score to the lowers score via the "order by score desc" tag.
It repeats the region with no problems and all the information is populating the correct table cell.
The scores are being displayed in descending order so I need to find a way to display the ranking of each row. Is there some simple mathematical coding I can place in the the first column that will add a place each time a new score is entered and rearragnge the ranking.
eg.
currently
simon 22.4
gary 22
steven 21
what i want is..
1 simon 22.4
2 gary 22
3 steven 21
and if paul comes along and scores 22.5
1 paul 22.5
2 simon 22.4
3 gary 22
4 steven 21
any help would be much appreciated.
Thanks
I have a table that displays a list of highscores. The code pulls the data from the sql table in the correct order highest score to the lowers score via the "order by score desc" tag.
It repeats the region with no problems and all the information is populating the correct table cell.
The scores are being displayed in descending order so I need to find a way to display the ranking of each row. Is there some simple mathematical coding I can place in the the first column that will add a place each time a new score is entered and rearragnge the ranking.
eg.
currently
simon 22.4
gary 22
steven 21
what i want is..
1 simon 22.4
2 gary 22
3 steven 21
and if paul comes along and scores 22.5
1 paul 22.5
2 simon 22.4
3 gary 22
4 steven 21
any help would be much appreciated.
Thanks
Comment