How to paginate query results for Infinite Scroll?

廉价感情. 提交于 2019-11-28 11:48:48

You need to add LIMIT to your queries. Example from the MySQL manual:

SELECT * FROM tbl LIMIT 5,10;  # Retrieve rows 6-15

Here, 5 is the starting offset, and 10 is the amount of rows you want to fetch.

For the client-side you'll need the infinite scroll jQuery plugin.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!