修改总数统计方式
This commit is contained in:
parent
0128cfec55
commit
64504bb861
|
@ -82,7 +82,7 @@ class ReviewController extends Zend_Controller_Action
|
||||||
$page=@(int)$this->_request->getParam('page');
|
$page=@(int)$this->_request->getParam('page');
|
||||||
if (empty($page)) $page=1;
|
if (empty($page)) $page=1;
|
||||||
$offset=$this->limit*($page-1);
|
$offset=$this->limit*($page-1);
|
||||||
$row=$this->db->fetchAll("select count(s.*) from mdstatus s left join metadata m on s.uuid=m.uuid where s.status in (0)");
|
$row=$this->db->fetchAll("select count(s.*) from mdstatus s right join metadata m on s.uuid=m.uuid where s.status in (0)");
|
||||||
$sum=$row[0]['count'];
|
$sum=$row[0]['count'];
|
||||||
$sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_created,g.id as gid,t.filename from mdstatus s right join metadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (0) order by s.ts_created desc,m.title limit ? offset ?";
|
$sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_created,g.id as gid,t.filename from mdstatus s right join metadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (0) order by s.ts_created desc,m.title limit ? offset ?";
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
||||||
|
|
Loading…
Reference in New Issue