开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜