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

This commit is contained in:
cuixin 2017-04-24 11:24:04 +08:00
parent a633b03007
commit db8c689c0a
2 changed files with 4 additions and 2 deletions

View File

@ -38,6 +38,8 @@ 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)";
//最新数据
$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->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)";

View File

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