Page 1 of 1

how to select top 700

Posted: Tue Sep 23, 2008 6:58 am
by mit
I need to select 700th and 1400th users that voted up to now in mysql.
the db is dynamic and people still voting , so every week top 700th and top 1400 (2 persons)must be selected and win...
then can any one tell me how i can select 700th and 1400th people ?!i cant say where id='700' coz db is dynamic ...
thx

Re: how to select top 700

Posted: Tue Sep 23, 2008 7:05 am
by onion2k
There are lots of different ways of doing this, but the easiest is...

Code: Select all

SELECT user_id FROM TABLE WHERE 1 ORDER BY user_id ASC LIMIT 700,1