New Tutorial: php paging and paging. how do you achieve paging and paging of multiple data items during php development? Thank you! Phppaging ------ solution ------------------ paging, 10 entries per page, paging with database limi new tutorial: php paging and paging problems
How do you implement paging and paging of multiple data items during php development? Thank you!
Php paging
------ 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;
......
------ Solution --------------------
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 ";
------ Solution --------------------
Reference:
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.
------ Solution --------------------
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