Let's say I have a query
SELECT *
FROM foo
ORDER BY id
And I want the 1st, 5th, 100th, 250th result, etc.
SELECT *
FROM foo
ORDER BY id
LIMIT 5, 1
Gives you the 5th. And I could run a similar query N times. But, how can I do it more elegantly in only one query?
Something like this (which doesn't work) would be amazing!
LIMIT 1, 5, 100, 250