限制Cakephp中的sql查找功能

raj*_*esh 8 cakephp

如何在cakephp中使用sql中的限制...我的意思是以下是sql ...

select * from emp limit 3,4
Run Code Online (Sandbox Code Playgroud)

如何在查找功能中使用上述限制[3,4] ...

has*_*opf 22

更好的方法: $this->Emp->find('all', array('limit'=>4, 'offset'=>3);


ple*_*ong 4

我没有测试过,但控制器中应该是这样的:

$this->Emp->find('all',array('limit'=>'3,4'));
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助