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

This commit is contained in:
cuixin 2017-04-24 11:16:02 +08:00
parent 1ca20c10dd
commit b216006f80
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

@ -85,7 +85,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>