修正全部浏览的数据范围

This commit is contained in:
wlx 2015-02-05 02:55:13 +00:00
parent 1486e47ad4
commit b6057dd0a1
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}