Limit sql in CakeFp search function

How can I use the sql limit in cakephp ... I mean that sql ...

select * from emp limit 3,4 

How to use the upper limit [3,4] in the search function ...

+7
source share
2 answers

The best way: $this->Emp->find('all', array('limit'=>4, 'offset'=>3);

+21
source

I have not tested it, but there should be something like this in the controller:

 $this->Emp->find('all',array('limit'=>'3,4')); 

Hope this helps

+4
source

All Articles