I have the following SELECT statement which allows me to display 10 items per page in a descending order:
SELECT * FROM items ORDER BY date DESC LIMIT XXXX, 10
XXXX is value that is calculated for each page where (XXXX = page number * 10). So, XXXX will be 0 for page 0, 10 for page 1, 20 for page 2, etc.
This seems to work perfectly, except that when a new item is added to the database, items from previous pages start to show in the current page.
Could you please suggest a MySQL or software engineering approach to ignore newly inserted items and preserve the initial order of items?