[thelist] [MySQL / PHP] - Getting a specific row and then a few either side of it?

Tris beertastic at gmail.com
Wed Apr 16 06:48:44 CDT 2008

Hi all..
I've a score board thingy, that I need to show the user where in the
ranking they are.
So if there were 100 people playing and I was position 42, I'd want to
select from the row, ordering by score, positions
38, 39, 40, 41, 42, 43, 44, 45, 46, 47 etc...

The only variable I wanna pass to that query is my unique ID No (each
user has one)

Is there an SQL query to do that, or would I have to combine two query results?


More information about the thelist mailing list