I am using data table inbuilt ajax custom pagination.
Here i need to pass 2 parameter in limit function .
I need some help to make it possible .I am using cakephp 3.2.
Below is my code.
$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']).
Eventually ,this is the end of my problem. Thank you any suggestion will be highly appreciated.