修正文档选取错误

This commit is contained in:
wlx 2011-10-23 09:46:24 +00:00
parent e95557c058
commit fc9a506046
1 changed files with 2 additions and 2 deletions

View File

@ -50,9 +50,9 @@ class HeiheController extends DataController
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d'))");
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from metadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80'))");
$sum=$row[0]['count'];
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d')) order by reference limit ? offset ?";
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from metadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80')) order by reference limit ? offset ?";
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
$this->view->offset=$offset+1;