Home  >  Article  >  Backend Development  >  Share a PHP database paging class, php database paging_PHP tutorial

Share a PHP database paging class, php database paging_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:13:501020browse

Share a PHP database paging class, PHP database paging

本帖最后由 luenmicro 于 2014-11-12 23:19 编辑

分享一个PHP数据库分页类。

[code] class page
{
private $pagesize;
private $lastpage;
private $totalpages;
private $nums;
private $numPage=1;

function __construct($page_size,$total_nums)
{
$this->pagesize=$page_size;      //每页显示的数据条数
            $this->nums=$total_nums;     //总的数据条数
            $this->lastpage=ceil($this->nums/$this->pagesize);     //最后一页
            $this->totalpages=ceil($this->nums/$this->pagesize);   //总得分页数
            if(!empty($_GET

Detailed description: http://php.662p.com/thread-555-1-1.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/913856.htmlTechArticleSharing a PHP database paging class, php database paging This post was last posted by luenmicro on 2014-11-12 23:19 The editor shares a PHP database paging class. [code]?php class page { private $p...
Statement:
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