【发布时间】:2010-12-02 21:14:10
【问题描述】:
我正在尝试将 Cakephp 中的分页概念用于我的应用程序..
var $paginate = 数组( '限制' => 5, '订单' => 数组( 'Report.report_id' => 'desc' ) );
在 cakephp 动作中
$conditions=array('Report.user_id'=>$userId);
$this->paginate['Report']['conditions']=$conditions;
$this->paginate['Report']['group']='Report.report_id';
$this->paginate['Report']['limit']=5;
$allreports=$this->paginate('Report');
现在这给了我查询的实际 5 个条目,按条件分组,但我现在没有在视图中获得页码..
在视图中
我用过喜欢
<?php echo $paginator->numbers(); ?>
但它没有显示任何内容??为什么这样..指导我...
【问题讨论】:
标签: cakephp