i have a student record table with rollno as id how can i get the first,previous,next,last records on button click from the database using php
i used $rollno+1 for next record and $rollno-1 for previous record
When a rollnum is missing then it should go for the next or previous record
For example : i have rollnums like this 1,2,3,5,6.....
When my roll num is 3 when i click next it should display the next record that is record with rollno num 5 how can i get this similarly for the previous record
Help me with this