In this tutorial you will learn how to create your own Highscores for your games, using your own free server / database. Let's go! Here's an example of how the...
So if we have more than one person with same score, how will that work? Anyway you can also get sql to check not just score but also name?
If you have: Andy 30, Brad 25, Charly 25, David 20, Edgar 15, Frank 15, George 15, Helen 10
- getrank.php?score=20 (for David) will return Rank #4 ("there are 3 better scores")
- getrank.php?score=15 (for Frank) will return Rank #5 ("there are 4 better scores." This ignores other people with same score -15-. In other words, it ranks you as the best in your same score. With 15 points your rank could be #5, #6 or #7. You can also make ALL of them with score=15 rank "5th")
This is like some top scores looking like this:
1 Andy
2 Brad
2 Charly
4 David
5 Edgar
5 Frank
5 George
8 Helen
Thanks