diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index fe3f701d..df4f72a5 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -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个入库数据