diff --git a/application/default/controllers/IndexController.php b/application/default/controllers/IndexController.php index ba5e9588..53451993 100755 --- a/application/default/controllers/IndexController.php +++ b/application/default/controllers/IndexController.php @@ -38,7 +38,9 @@ class IndexController extends Zend_Controller_Action } //下载最多数据(top 5) $sql="select uuid,title,id from {$this->submd} where id in (select m.id from {$this->submd} m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)"; - $this->db->setFetchMode(Zend_Db::FETCH_BOTH); + //最新数据 + $sql = "select id,uuid,title,ts_created from {$this->submd} order by ts_created desc limit 5"; + $this->db->setFetchMode(Zend_Db::FETCH_BOTH); $this->view->mdtop=$this->db->fetchAll($sql); $sql="select uuid,title,id from {$this->submd} where id in (select m.id from {$this->submd} m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)"; $this->view->offlinemdtop=$this->db->fetchAll($sql); diff --git a/application/default/views/scripts/index/index.phtml b/application/default/views/scripts/index/index.phtml index 538de85c..0c5640fe 100755 --- a/application/default/views/scripts/index/index.phtml +++ b/application/default/views/scripts/index/index.phtml @@ -78,7 +78,7 @@