随机展示数据光盘
This commit is contained in:
parent
3dde2e50f2
commit
005c577945
|
@ -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)";
|
||||||
|
|
Loading…
Reference in New Issue