Limit sql in Cakephp find function
How can I use limit in sql in cak开发者_运维技巧ephp...I mean follwoing is the sql...
select * from emp limit 3,4
How can use above limit [3,4] in find function ...
Better way: $this->Emp->find('all', array('limit'=>4, 'offset'=>3);
I haven't tested it, but it should be something like this in the controller:
$this->Emp->find('all',array('limit'=>'3,4'));
Hope this helps
精彩评论