I would do the same as the created_at example. Order your query by the name whether asc or desc and then use the where clause to filter the names you've already seen.
If page one is:
AAA
AAB
AAC
your query could be
SELECT * from users
WHERE name < 'AAC'
ORDER BY name DESC
LIMIT 3
Its a little bit harder if the user can sort things by a lot of different factors. You can make the decision to just use OFFSET anyway depending on how much data you have
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would do the same as the created_at example. Order your query by the name whether asc or desc and then use the where clause to filter the names you've already seen.
If page one is:
AAA
AAB
AAC
your query could be
Its a little bit harder if the user can sort things by a lot of different factors. You can make the decision to just use OFFSET anyway depending on how much data you have