Implement processing of 10 pages and 10 pages after 10 pages
Source: Internet
Author: User
It can process 10 pages, 10 pages, 10 pages, and 10 pages after 10 pages ,? /* ==== Display data records by page ==== a page with 10 consecutive pages connected to one page can display $ limit_row record information with the following 10 pages and top 10 pages features ====================================== ==------ required "> <LINK /* ==== Display data records by page ====
A page has ten consecutive page connections
$ Limit_row record information is displayed on one page.
It also has the following 10 pages and top 10 pages flip function
==========================================
------ Value $ total_row; $ limit_row; $ pagename ;-----
$ Total_row indicates the total number of rows in the selected query results.
$ Limit_row indicates the maximum number of lines displayed on each page.
$ Pagename indicates the name of the returned display page. (Without suffix)
----------------------------------------------------
----------------------------------------------------
$ Page current read page
$ Total_page can be divided into several pages.
$ Row_begin indicates the number of rows to read.
$ Row_end indicates the number of rows read.
-----------------------------------------------------*/
If (! $ Page) {$ page = 1 ;}
$ Total_page = ceil ($ total_row/$ limit_row );
$ Row_begin = $ limit_row * ($ page-1 );
If ($ page = $ total_page & ($ total_row % $ limit_row )){
$ Read_row = ($ total_row % $ limit_row );
} Else {$ read_row = $ limit_row ;}
If ($ total_page <= 10 ){
$ Page_begin = 0;
$ Page_end = $ total_page;
$ Page10 = 1;
$ Newpage10 = 1;
} Else {
// -------------- Display the next 10 pages by page ----------------
// $ Page10 contains dozens of pages in total
// $ Newpage10 is the starting position for reading ten pages
// $ Page_endx indicates the last page number to be read.
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.