From 6c3f3bf0c3d232574dc19ebcae29dc580d8c7c77 Mon Sep 17 00:00:00 2001 From: wlx Date: Fri, 21 Feb 2014 08:47:39 +0000 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E5=8A=A9=E9=A1=B9=E7=9B=AE=E4=BB=A5?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E8=BF=9B=E8=A1=8C=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/HeiheController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/default/controllers/HeiheController.php b/application/default/controllers/HeiheController.php index 742b59c1..782b3fa6 100644 --- a/application/default/controllers/HeiheController.php +++ b/application/default/controllers/HeiheController.php @@ -1167,7 +1167,10 @@ class HeiheController extends DataController } } else { //提供全部分类列表 - $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 left join heiheproject hp on f.fund_id=hp.code where hp.id is not null and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') 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 left join heiheproject hp on f.fund_id=hp.code + where hp.id is not null and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') + group by f.id,f.title,f.fund_id,f.fund_type,f.ts_created order by f.fund_id asc"; $sth = $this->db->prepare($sql); $sth->execute(); $rows = $sth->fetchAll();