已下sql加了分页就报错
$data = $this->dao->select('DISTINCT t1.*,t2.realname AS handler,t3.bugNum')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.handler = t2.account')
->leftJoin("(SELECT task,COUNT(*) AS bugNum FROM zt_bug WHERE task > 0 GROUP BY task)")->alias('t3')->on('t1.id = t3.task')
->page($pager)
->fetchAll();
18:48:39 ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 <p>The sql is: SELECT DISTINCT t1.*,t2.realname AS handler,t3.bugNum FROM `zt_task` AS t1 LEFT JOIN `zt_user` AS t2 ON t1.handler = t2.account LEFT JOIN (SELECT task,COUNT(*) AS bugNum FROM zt_bug WHERE task > 0 GROUP BY task) AS t3 ON t1.id = t3.task </p> in /var/www/html/zentao/lib/base/dao/dao.class.php on line 1381, last called by /var/www/html/zentao/lib/base/dao/dao.class.php on line 379 through function sqlError.
in /var/www/html/zentao/framework/base/router.class.php on line 2280 when visiting
$data = $this->dao->select('DISTINCT t1.*,t2.realname AS handler,t3.bugNum')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.handler = t2.account')
->leftJoin("(SELECT task,COUNT(*) AS bugNum FROM zt_bug WHERE task > 0 GROUP BY task)")->alias('t3')->on('t1.id = t3.task')
->page($pager)
->fetchAll();
18:48:39 ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 <p>The sql is: SELECT DISTINCT t1.*,t2.realname AS handler,t3.bugNum FROM `zt_task` AS t1 LEFT JOIN `zt_user` AS t2 ON t1.handler = t2.account LEFT JOIN (SELECT task,COUNT(*) AS bugNum FROM zt_bug WHERE task > 0 GROUP BY task) AS t3 ON t1.id = t3.task </p> in /var/www/html/zentao/lib/base/dao/dao.class.php on line 1381, last called by /var/www/html/zentao/lib/base/dao/dao.class.php on line 379 through function sqlError.
in /var/www/html/zentao/framework/base/router.class.php on line 2280 when visiting
请求地址:http://www.yc-zentao.com:8146/itservice-getList.json?page=2
改成这样:http://www.yc-zentao.com:8146/itservice-getList-page-2.json $_GET 中也没有page 但是在入口文件index.php 中打印$_GET 是有page的 ,请问 有什么方法可以获取到么?