From a62960a0e6d6b2dc359d85275b6baaffe44950cc Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 6 Jun 2013 06:28:10 +0000 Subject: [PATCH] =?UTF-8?q?#503,=20=20=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E7=9A=84=E6=8E=92=E5=BA=8F=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 df8971c9..232dc03b 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -1883,7 +1883,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(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"; + $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 where m.id is not null group by f.id,f.title,f.fund_id,f.fund_type,f.ts_created order by datacount desc,f.ts_created desc"; $sth = $this->db->prepare($sql); $sth->execute(); $rows = $sth->fetchAll();