我正在使用数据表内置ajax自定义分页。如何通过cakephp限制的另一个参数3.2
这里我需要在限制函数中传递2个参数。
我需要一些帮助才能使它成为可能。我正在使用cakephp 3.2。
以下是我的代码。
$sql.=" ORDER BY ". $columns[$requestData['order'][0]['column']]." ".$requestData['order'][0]['dir']." LIMIT ".$requestData['start']." ,".$requestData['length']." ";
This code is in core php ,
I want to convert it into cakephp .
Below is what i have tried so far.
$order=$requestData['order'][0]['dir']; //descending ya ascending
$id=$columns[$requestData['order'][0]['column']];///order by which column
$query= $this->Orders->find('all')->where($condition)->limit($requestData['length'])->order(['Orders.'. $id.' '.$order]);
How can i write this code LIMIT ".$requestData['start']." ,".$requestData['length']." ";
Using cakephp ,
In limit how to give both the limit as well as the start parameter($requestData['start']).
最后,这是我的问题的结束。 谢谢任何建议将不胜感激。
哇,它真的工作。 非常感谢,您节省了我的时间。 :) :);) – sradha
WOW ...严重吗? ;) –
是的,我已经在page()中完成了它,但是我需要偏移量。 我了解它,并再次感谢你。 ;););):) – sradha