首页 热门数据 修改为 最新数据集
This commit is contained in:
parent
1ca20c10dd
commit
b216006f80
|
@ -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);
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue