PHP framework-PHP MySQL limit paging problem

Source: Internet
Author: User
Tags php mysql
I would like to ask whether the actual application is using limit n,m to achieve paging?

But I found that there is a problem, the data "confusion" problem, when the data changes frequently, the use of Ajax to do waterfall flow will be repeated display information, or some directly missed, because, because because of why this is very easy to think of it, because the n,m has changed, the sum of the data has changed in a short time , which leads to the "confusion" of the database that limit is given here.

I do not know how to solve this problem, can only be said to use the limit paging too, in fact, it is impossible to do this paging bar

Reply content:

I would like to ask whether the actual application is using limit n,m to achieve paging?

But I found that there is a problem, the data "confusion" problem, when the data changes frequently, the use of Ajax to do waterfall flow will be repeated display information, or some directly missed, because, because because of why this is very easy to think of it, because the n,m has changed, the sum of the data has changed in a short time , which leads to the "confusion" of the database that limit is given here.

I do not know how to solve this problem, can only be said to use the limit paging too, in fact, it is impossible to do this paging bar

2333 Waterfall Flow which has so paged ...

What is the sort of waterfall stream based on? Time. The last time you read it, you can read it from where you started.

For example, the last time you read 1 o'clock, the next page should be:

select * from tbl where datetime > 1点钟 limit 10

You don't use limit offset for this. You can write your own select, for example, every time you take the second page to send the last ID, and then use limit from id+1 start to take N.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: [email protected] and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.