文献信息中合并作者信息
This commit is contained in:
parent
bf5750a2dd
commit
e824fd217c
|
@ -594,15 +594,15 @@ class DataController extends Zend_Controller_Action
|
||||||
$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 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));
|
$this->view->related=$this->db->fetchAll($sql,array($id,$id));
|
||||||
//相关文献
|
//相关文献
|
||||||
$sql="select * from knl_article where ";
|
$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 (";
|
||||||
foreach($this->view->keys as $k)
|
foreach($this->view->keys as $k)
|
||||||
{
|
{
|
||||||
if ($k->keytype=='theme')
|
if ($k->keytype=='theme')
|
||||||
{
|
{
|
||||||
$sql.=" title like '%".$k->keyword."%' or ";
|
$sql.=" a.title like '%".$k->keyword."%' or ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql.=" 1<>1 limit 10";
|
$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 = $this->db->quoteInto("select m.id,a.realname from mdattach m left join attachments a on m.id=a.id where m.uuid=?",$uuid);
|
$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);
|
||||||
|
|
Loading…
Reference in New Issue