I need a way to grab "the next row" from a table in a mysql database. The table has an index that auto increments, but some of the rows may be deleted. So, for instance, the table might look like this:
Code:
3
4
6
7
8
9
14
15
16
18
20
...
To get the first row, I believe I can go:
Code:
SELECT columns FROM table ORDER BY index LIMIT 1
That should give me the first row, right?
But after this, I'm not sure what to do. Say I've read the first row up to the second (index = 4), how do I then get the next row? ("the next row" being the third row with index = 6).
Thanks 
|