Home > php教程 > php手册 > body text

分享一个PHP数据库分页类,php数据库分页

WBOY
Release: 2016-06-13 09:20:53
Original
1122 people have browsed it

分享一个PHP数据库分页类,php数据库分页

 

本帖最后由 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

详细说明:http://php.662p.com/thread-555-1-1.html

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!