New Tutorial: php paging and paging

Source: Internet
Author: User
New Tutorial: php paging and paging. how do you achieve paging and paging of multiple data items during php development? Thank you!


Reply to discussion (solution)

Page, 10 entries per page,
Use the database limit to flip pages.
On the first page, select * from test_table limit;
Page 2: select * from test_table limit 10, 10;
Page 3: select * from test_table limit 20, 10;
......

Write an SQL statement based on the number and number of pages displayed on each page
$ PageSize number of entries per day
$ NowPage current page number
$ Cnt = ($ nowPage-1) * $ pageSize;

$ SQL = "select * from table limit $ cnt, $ pageSize ";

Can jQuery and Ajax be used?


Can jQuery and Ajax be used?

Of course you can. if you don't want to write it yourself, you can search for such classes on the Internet.

Generally, the page is displayed based on my resolution. if the screen size is large, more records will be displayed on the page. otherwise, fewer records will be displayed! GA

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: info-contact@alibabacloud.com 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.