remove the limits

This commit is contained in:
wlx 2012-04-25 06:44:28 +00:00
parent 672f8ed5fc
commit 8da0658fd7
1 changed files with 4 additions and 4 deletions

View File

@ -21,15 +21,15 @@ class DataController extends Zend_Controller_Action
//关键词
$state=$this->db->query("select keyword,count(*) from keyword where keytype='place' group by keyword order by count desc limit 20");
$k1=$state->fetchAll();
//$state=$db->query("select keyword,count(*) from keyword where keytype='theme' group by keyword order by count desc limit 20");
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
$state=$this->db->query("select keyword,count(*) from keyword where keytype='theme' group by keyword order by count desc limit 20");
//$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
$k2=$state->fetchAll();
$state=$this->db->query("select keyword,count(*) from keyword where keytype='discipline' group by keyword order by count desc limit 20");
$k3=$state->fetchAll();
$state=$this->db->query("select keyword,count(*) from keyword where keytype='stratum' group by keyword order by count desc limit 20");
$k4=$state->fetchAll();
//$state=$db->query("select keyword,count(*) from keyword where keytype='temporal' group by keyword order by count desc limit 20");
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='temporal' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
$state=$this->db->query("select keyword,count(*) from keyword where keytype='temporal' group by keyword order by count desc limit 20");
//$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='temporal' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
$k5=$state->fetchAll();
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
//最新10个入库数据