修正全部浏览的数据范围
This commit is contained in:
parent
1486e47ad4
commit
b6057dd0a1
|
@ -192,11 +192,11 @@ class DataController extends Zend_Controller_Action
|
|||
if (empty($page)) $page=1;
|
||||
$limit=10;
|
||||
$offset=$limit*($page-1);
|
||||
$state=$this->db->query('select count(*) from metadata');
|
||||
$state=$this->db->query('select count(*) from normalmetadata');
|
||||
$row=$state->fetchAll();
|
||||
$sum=$row[0]['count'];
|
||||
$select=$this->db->select();
|
||||
$select->from('metadata','*')->order('id desc')->limitPage($page,$limit);
|
||||
$select->from('normalmetadata','*')->order('id desc')->limitPage($page,$limit);
|
||||
$this->view->metadata = $this->db->fetchAll($select);
|
||||
$this->view->page=new Pagination($sum,$page,$limit);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue