我想将此mysql查询(SELECT * FROM (SELECT * FROM practice_details LIMIT 6 OFFSET 5) a ORDER BY practice_name ASC
)转换为zend框架2,但不知道如何转换。我是新手。
谢谢你
答案 0 :(得分:0)
2个步骤:
首先:写下子选择SELECT * FROM practice_details LIMIT 6 OFFSET 5
$subselect = new Select();
$subselect->from('practice_details')->limit(6)->offset(5);`
然后:写下选择
$select = new Select();
$select->from(['a' => $subselect])->order('practice_name ASC');