码迷,mamicode.com
首页 > 其他好文 > 详细

分享一个自己写的基于TP的关系模型(四)

时间:2015-07-02 13:52:14      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:

修复分页BUG,原有代码查询到最后一页就一只查询最后一页

$this->nowPage    = $this->nowPage>0 ? $this->nowPage : 1;
        $this->maxPage =  ceil($this->total/$this->rows);
        //$this->nowPage > $this->maxPage and $this->nowPage = $this->maxPage;

        $this->firstRow   = $this->rows * ($this->nowPage - 1);

注释如上代码

新代码现在都托管到github:https://github.com/wangdong007092/thinkphp-model

分享一个自己写的基于TP的关系模型(四)

标签:

原文地址:http://www.cnblogs.com/xiaodo0/p/4615664.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!