我有一个查询要从 db 阅读杂志
$select = $db->select()
->from('tbl_magazine',array('magazine_id','magazine_name'))
->join('tbl_magazine_issue','tbl_magazine_issue.magazine_id = tbl_magazine.magazine_id',array(null))
->join('mst_publisher','mst_publisher.publisher_id = tbl_magazine.publisher_id',array(null))
->where('tbl_magazine.is_active =?',1)
->where('mst_publisher.is_active =?',1)
->where('tbl_magazine_issue.os_select =?',2)
->where('tbl_magazine_issue.publish_status = ?',1)
->where('curdate() <= DATE(tbl_magazine.validity_till)')
->group('tbl_magazine.magazine_id')
->limit($start,$per_page);
但是当我打印查询时,我看到了类似这样的东西
SELECT `tbl_magazine`.`magazine_id`, `tbl_magazine`.`magazine_name`
FROM `tbl_magazine`
INNER JOIN `tbl_magazine_issue` ON tbl_magazine_issue.magazine_id = tbl_magazine.magazine_id
INNER JOIN `mst_publisher` ON mst_publisher.publisher_id = tbl_magazine.publisher_id
WHERE (tbl_magazine.is_active =1) AND (mst_publisher.is_active =1)
AND (tbl_magazine_issue.os_select =2) AND (tbl_magazine_issue.publish_status = 1)
AND (curdate() <= DATE(tbl_magazine.validity_till))
GROUP BY `tbl_magazine`.`magazine_id`
LIMIT 2147483647 OFFSET 8
但我已将 $start 设置为 0 并将 $perpage 设置为 8
我正在寻找一个限制为的查询"limit 0 ,8"