I originally published a paging class that is separated from the database. When I used it recently, I found that sometimes when the search items are too large, using the URL to pass parameters may have certain effects or known bugs. This time I did some It is extended and compatible with the previous mode. It is very simple to use the above. You only need to set one more parameter. The code is as follows:
Copy the code The code is as follows:
/** * Function: Pagination class, based on the total amount of data provided and page size * Created date: Fri Apr 20 16:45:21 CST 2007 * Last updated: * Author: sanshi < ;sanshi0815@tom.com> */
class pagination { var $result = array(); var $pVar = "myp";//Page parameter paging count var $urlParamStr = ""; //All parameters of the page var $sqlMoveNumber = 0; //Data offset var $is_post = false;
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn