1
在我的控制器我有這個排序和分頁的CakePHP
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');
}
我讓所有的用戶提供一定的試驗編號,但現在我的那種不工作。我怎樣才能添加分頁。 我試圖
$this->User->recursive = 0;
$this->set('users', $this->paginate());
,並沒有工作 感謝
它現在是如何工作的?您的意見是否正確設置以處理分頁? – mensch