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 (";