I try to write a litte Highscore list. In Fact, the list work well, but i don´t want to display all entries. Thats why I try to let users who are to worse to be displayed, know how worse they are.
I use this:
$holrang = mysql_query("SELECT @ROW := @ROW + 1 AS row, scoreScore FROM score, (SELECT
@ROW := 0) r WHERE scoreScore = '$score' ") or die(mysql_error());
$getrang = mysql_fetch_assoc($holrang);
$rang = $getrang['row'];
//$score is the score that the User reached and submit to the list.
to get the "rang" of the User. But the query only replay "1".
Another try to explain:
We have a Scorelist:
- Player1 10
- Player2 20
- Player3 30
- Player4 40
- Player6 60
and only display the first 3. Now Player5 submit his score of 50 to the list. He is in fact on rang 5. I want a query to get this "5".
Can you give me a hint?