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

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -