public function getAllByAreaList($areaId, $languageId) { $areaDb = new Model_DbTable_Area(); $areaList = $areaDb->getAllAreaChildList($areaId); if (count($areaList)) { $query = $this->select()->setIntegrityCheck(false)->from($this->_name, array('poi_id', 'poi_name' => 'name', 'description'))->join($this->_desti, "{$this->_desti}.poi_id = {$this->_name}.poi_id", array('pointX', 'pointY', 'special'))->join($this->_atp, "{$this->_atp}.poi_id = {$this->_name}.poi_id", array(''))->where("{$this->_name}.language_id = ?", $languageId)->where("{$this->_atp}.area_id IN (?)", $areaList)->order("{$this->_desti}.special")->group("{$this->_name}.poi_id"); //echo $query->__toString(); $data = $this->fetchAll($query); if (count($data)) { return $data->toArray(); } } return array(); }