【发布时间】:2012-05-10 15:19:14
【问题描述】:
在我的控制器中我有这个
public function station_users($id=null){
$users = $this->User->find('all',array('conditions'=>array('test_id'=>$this->params['named']['test_id'])));
$this->set('users', $users);
$this->render("station_users",'ajax');
}
我正在为某个测试 ID 获取所有用户,但现在我的排序不起作用。如何添加分页。 我试过了
$this->User->recursive = 0;
$this->set('users', $this->paginate());
那没用 谢谢
【问题讨论】:
-
现在效果如何?您的视图设置是否正确以处理分页?
标签: cakephp cakephp-1.3 cakephp-2.0 cakephp-2.1