From ef199cb5dcf9af03ab7ebab66ad8771aa81a5526 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 30 Apr 2013 02:18:23 +0000 Subject: [PATCH] change sql --- application/default/controllers/DataController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 4a03d822..690b7bfc 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -1987,7 +1987,7 @@ class DataController extends Zend_Controller_Action } } else { //提供全部分类列表 - $sql="select f.id,f.title,f.fund_id,f.fund_type,f.ts_created,count(m.id) as datacount,sum(m.filesize) as filesize from fund f left join mdfund m on f.id=m.fid group by f.id,f.title,f.fund_id,f.fund_type,f.ts_created order by f.ts_created desc"; + $sql="select f.id,f.title,f.fund_id,f.fund_type,f.ts_created,count(m.id) as datacount,sum(md.filesize) as filesize from fund f left join mdfund m on f.id=m.fid left join metadata md on m.uuid=md.uuid group by f.id,f.title,f.fund_id,f.fund_type,f.ts_created order by f.ts_created desc"; $sth = $this->db->prepare($sql); $sth->execute(); $rows = $sth->fetchAll();