From 1edcad768a7ba66c917d9e325f7f6cab125651c2 Mon Sep 17 00:00:00 2001 From: cuixin Date: Mon, 24 Apr 2017 11:14:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=20=E7=83=AD=E9=97=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20=E4=BF=AE=E6=94=B9=E4=B8=BA=20=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E6=95=B0=E6=8D=AE=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/IndexController.php | 4 +++- application/default/views/scripts/index/index.phtml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 @@
-

热门在线数据集

+

最新数据集

    mdtop as $k=>$v){ ?>