随机展示数据光盘

This commit is contained in:
wlx 2011-10-28 09:49:16 +00:00
parent 3dde2e50f2
commit 005c577945
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class IndexController extends Zend_Controller_Action
$sql="select * from datafeature order by id desc"; $sql="select * from datafeature order by id desc";
$this->view->feature=$this->db->fetchRow($sql); $this->view->feature=$this->db->fetchRow($sql);
//特色数据集 //特色数据集
$sql="select * from datasetcd order by id desc"; $sql="select * from datasetcd order by random()";
$this->view->datasetcd=$this->db->fetchRow($sql); $this->view->datasetcd=$this->db->fetchRow($sql);
//下载最多数据(top 5) //下载最多数据(top 5)
$sql="select uuid,title,id from metadata where id in (select m.id from metadata m left join dataorder d on m.uuid=d.uuid group by m.id order by count(d.uuid) desc limit 5)"; $sql="select uuid,title,id from metadata where id in (select m.id from metadata m left join dataorder d on m.uuid=d.uuid group by m.id order by count(d.uuid) desc limit 5)";