mysql - Pagination issue while sorting based on last modified property -
I have to show some sorted sort based on the modified column (latest activity on top) (with new edit or comments Post Top)
There's Twitter like 'More' post buttons for applying anil scroll in app UI. Each 'more' will add the next 10 records in the UI.
The issue is that when any of the records shown in the points are modified then the pagination index breaks
For example, suppose I have a record A, B, C, .. in the Z tables
.
The first time I am showing the user using the ' AJ
record
SELECT * jobs where 1 record past_modified DESC limit 1 ,
But if some body revises any record after any record, then DESC limit 10, 10
in the last 9 months Select J
,
before clicking on 'More button', 1 order from jobs, final_defended DESC limit 10, 10
< / Pre>
JS
>
. I can hide it by inserting J
in the UI but more buttons will show only 9 records. But this system fails when a large number of records are updated, if 10 records are modified , The query will returnAJ
again.What is the best way to handle this problem?
The second time the stamp fails to maintain if there are multiple updates in a record.
query the server's cache?
I have a pre-set offset, instead of just a straight border, I will lIMIT.
SELECT * FROM jobs where the name ('A', 'B', 'C', 'D', 'E', 'F', 'G', '' '' 'H', 'I', 'J')
In this way you still get 10 most recently, but you already have those IDs in your SQL query It has been shown that continuous negative matching is being done or not.
Comments
Post a Comment