Re: SELECT until -
02-08-2010
, 12:55 PM
OP:
I assume your problem is similar with my case, which is :
MMORPG with about 1giga player with three attributes
(agility,strength,intel).
For each attribute the possible values are 0 to 99 (with interval
0,1).
Based on user's selected attribute, I want to show the user at which
position he/she is in the game.
For example: my strength is 20.56 and based on strength I am ranked 60
on the list.
For this problem you can solve wtih two query.
First.
Select count(1) from player where str < 20.56
Put the result in var a.
Then second query :
select count(1) from player where str = 20.56
Put the result in var b
So my ranking is ranged from a to (a+b)
Nb: you can also modify second query using order by user_id asc |