Next and Previous MySQL row based on name
- by NightMICU
Hi everyone,
I have a table with details on personnel. I would like to create a Next/Previous link based on the individual's last name. Since personnel were not added in alphabetical order, selecting the next or previous row based on its ID does not work.
It is a hefty table - the pertinent fields are id, name_l, and name_f. I would like to order by name_l, the individuals' last name.
How would I go about accomplishing this task?
Thanks!