Ok, so I have a table that has the following
KEY username password score
The above columns are not in any particular order.
I want to send my database username and send me back what rank this username is based on its rating. So, for example, if I had 10 people, and the 3rd person has the highest score. When I pass the 3rd party username, I want it to send back 1.
Is it possible?
I tried such things
$result = mysql_query("SELECT * FROM tablename where username='$username' ORDER BY score DESC");
but he doesn't seem to give me the line number
source share