Selecteer de volgende rij hieronder:
SELECT * FROM Example WHERE id < 3 ORDER BY id DESC LIMIT 1
Selecteer de volgende rij hierboven:
SELECT * FROM Example WHERE id > 3 ORDER BY id LIMIT 1
Selecteer beide in één zoekopdracht, b.v. gebruik UNION :
(SELECT * FROM Example WHERE id < 3 ORDER BY id DESC LIMIT 1)
UNION
(SELECT * FROM Example WHERE id > 3 ORDER BY id LIMIT 1)
Bedoel je dat?