Do more with
SELECT id FROM users WHERE id < $id ORDER BY id DESC LIMIT 1
Where $id is the id of the currently viewed user. Then do the opposite for the next user:
SELECT id FROM users WHERE id > $id ORDER BY id ASC LIMIT 1
Hope that helps.
Premium Content
You need an Expert Office subscription to comment.Start Free Trial