开发者

Limit sql in Cakephp find function

开发者 https://www.devze.com 2023-03-30 23:23 出处:网络
How can I use limit in sql in cak开发者_运维技巧ephp...I mean follwoing is the sql... select * from emp limit 3,4

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

0

精彩评论

暂无评论...
验证码 换一张
取 消