Cake php 查询 returns 起始记录数和总记录数的限制

Cake php query for limit that returns starting record no and total no records

我是 CakePHP 框架的新手,想问一个很简单的问题:

SELECT * from quiz_questions LIMIT 1,2

如何在 CakePHP3 中编写以上内容?

我尝试了什么:

$this->QuizQuestions->find()->limit(1,2);

并且:

$this->QuizQuestions->find()->limit([1,2]);

你可以这样试试

 $this->QuizQuestions->find('all', array('limit'=>1, 'offset'=>2));

尝试使用此查询。

$query = $this->QuizQuestions->find()
->limit(50)
->page(2);