is there a proper way to do this:
ID | name
1 | aa
4 | bb
6 | dd
9 | ee
ID is the primary index with auto_increment… missing indexes were DELETEd by SQL so there are some empty spaces
if I navigate in page?ID=4 I want to get the previous row (with ID 1) and the next one (with ID 6) (added:) using the same query
is there a way to do this without selecting/traversing the entire resultset?
thank you in advance!
1 Answer