I have a simple MySQL table where I save the score of play. It looks like that:
**Id - UserId - Score**
The question is: How do I get what's a users rank? I have a users Id
An Example
**Id - UserId - Score**
1 - AAAA - 150
2 - BBBB - 110
3 - BBBB - 120
4 - CCCC - 102
5 - AAAA - 130
In this very case, IdUser CCCC rank would be 3, because he got the 3rd highest score.
The query should return one row, which contains (only) the required Rank.
Thanks!