This is the example table:
Column | 1st record | 2nd record | 3rd record | 4th record | etc id (primary) | 1 | 5
Once you have the id 8, you should be able to do a variation on:
8
select * from mytable where id < 8 order by id desc limit 1
and:
select * from mytable where id > 8 order by id asc limit 1
for the previous and next record.