I want to do this:
Check the top 10 values of points.
Here is my condition:
If there are less than 10 records (rows) found, e.g give bonus
If the points is in top ten (among hundreds records/rows), give bonus.
So, what i do is (wrong method):
SELECT points FROM `scores` WHERE id = '1' ORDER BY score DESC LIMIT 9 , 1
That will only work if i have more then 9 (at least 10) data/records.
Is there any other way?
I am thinking of using this(not very good though):
SELECT points FROM `scores` WHERE id = '1' ORDER BY score DESC LIMIT 0 , 10
Then get the last value of mysql_fetch_assoc data. Thus, how do I get the last value of mysql_fetch_assoc data?