Let’s say I have this sql query:
SELECT * FROM questions ORDER BY votes LIMIT 3
That is loaded on one page. How do I get the the next 3 by providing the ID of the last one retrieved(1). Example of a table:
ID votes
--------
4 29
45 26
1 23
7 13
23 5
9 2
You can use offset
SELECT * FROM table_name LIMIT offset,limit.Example: