Select Next and previous row data SQLite -
i want ask on how next , previous data when select "8787"
this sample data on table name:
nameid not auto number.
nameid rname 6767 apple 8787 hallow 8627 orange
thanks
to next id, throw away ids not larger, sort table id next id first one, take 1 record:
select * mytable nameid > 8787 order nameid limit 1
similar previous id:
select * mytable nameid < 8787 order nameid desc limit 1
Comments
Post a Comment