我想过滤分页。如果我在第1页并且我修改了查询它工作正常,但在第2页中构建的查询是
SELECT .... LIMIT 40,20
由于我只有一个页面,因此结果为空。 如何通过分页强制返回第1页进行搜索? 我的代码是
$conditions = array('transaction LIKE' => '%' .
$this->request->data['User']['trans_id'] . '%');
$this->set('deposits', $this->paginate($conditions));
我在分页文档中读到我可以try catch
使用$this->paginate($conditions)
,但不确定如何在catch中重定向。