分页类,无法显示设置的条数

浏览:1290 发布日期:2014/07/10 分类:求助交流 关键字:
//分页查询
$product_show = M('Product_show');
import("ORG.Util.Page");// 导入分页类
$count = $product_show->where("cateid=$id")->count('5','5');// 查询满足要求的总记录数
//dump($count);
$Page = new Page($count,5);// 实例化分页类 传入总记录数和每页显示的记录数
//dump($Page);
$show = $Page->show();// 分页显示输出
$this->assign('page',$show);// 赋值分页输出
$this->display();
最佳答案
评论( 相关
后面还有条评论,点击查看>>