diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 3e73a336..e7affe15 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -599,7 +599,10 @@ class DataController extends Zend_Controller_Action } } $sql.=" 1<>1) order by a.ts_created desc limit 10"; - $this->view->literature=$this->db->fetchAll($sql); + $this->view->literature=$this->db->fetchAll($sql); + //相关元数据,根据同名关键词实现 + $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"; + $this->view->related=$this->db->fetchAll($sql,array($id,$id)); //数据附件 $sql = $this->db->quoteInto("select m.id,a.realname from mdattach m left join attachments a on m.id=a.id where m.uuid=?",$uuid); $this->view->attachments = $this->db->fetchAll($sql);