Does anybody have a good solution for this?
I have a table below
select * from table
ID, TITLE
1 a
2 b
3 c
4 d
I need to query the table at the ID each time but return
the ID above and below the selected row.
So if I query the row at
select * from table where ID=2
I want ID=1 as the last and ID=3 as the next
also
select * from table where ID=1
I want ID=4 as the last and ID=2 as the next
So that the results from my asp page roll around. Is there a simple solution to ?
I have a table below
select * from table
ID, TITLE
1 a
2 b
3 c
4 d
I need to query the table at the ID each time but return
the ID above and below the selected row.
So if I query the row at
select * from table where ID=2
I want ID=1 as the last and ID=3 as the next
also
select * from table where ID=1
I want ID=4 as the last and ID=2 as the next
So that the results from my asp page roll around. Is there a simple solution to ?