首页 热门数据 修改为 最新数据集

This commit is contained in:
cuixin 2017-04-24 11:14:17 +08:00
parent 79afbe5284
commit 1edcad768a
2 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,9 @@ class IndexController extends Zend_Controller_Action
} }
//下载最多数据(top 5) //下载最多数据(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)"; $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); $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)"; $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); $this->view->offlinemdtop=$this->db->fetchAll($sql);

View File

@ -78,7 +78,7 @@
</div> </div>
<div class="span4"> <div class="span4">
<div class="box"> <div class="box">
<h4 class="box-title">热门在线数据集</h4> <h4 class="box-title">最新数据集</h4>
<ul> <ul>
<?php foreach($this->mdtop as $k=>$v){ ?> <?php foreach($this->mdtop as $k=>$v){ ?>
<li> <li>