From 2ca228b7474417cdb82f1fd44687d901d530e494 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 8 Nov 2011 15:12:28 +0000 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=95=B0=E6=8D=AE=E9=87=87?= =?UTF-8?q?=E7=94=A8=E4=B8=BB=E9=A2=98=E5=85=B3=E9=94=AE=E8=AF=8D=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index ebad7c55..825ca58b 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -590,8 +590,8 @@ class DataController extends Zend_Controller_Action $sql="select u.* from uselimit u left join mdlimit m on u.id=m.lid where m.uuid=?"; $this->view->uselimits=$this->db->fetchAll($sql,array($uuid)); //相关元数据,根据同名关键词实现 - //$sql="select distinct(md.uuid),md.title from keyword kw left join metadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=? and k.keytype='theme') and kw.id<>? limit 10"; - $sql="select distinct(md.uuid),md.title from keyword kw left join metadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=?) and kw.id<>? limit 10"; + $sql="select distinct(md.uuid),md.title from keyword kw left join normalmetadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=? and k.keytype='theme') and kw.id<>? limit 10"; + //$sql="select distinct(md.uuid),md.title from keyword kw left join metadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=?) and kw.id<>? limit 10"; $this->view->related=$this->db->fetchAll($sql,array($id,$id)); //相关文献 $sql="select a.*,array_to_string(array(select author from knl_author t where t.item_id=a.item_id order by place asc),'; ') as author from knl_article a where (";