Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 1188 | Rev 1214 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1188 Rev 1190
Line 96... Line 96...
96
	}
96
	}
Line 97... Line 97...
97
 
97
 
98
	private function obtenirLois(Array $id_lois) { 
98
	private function obtenirLois(Array $id_lois) { 
99
		$id_lois = array_map(array($this->bdd, 'proteger'), $id_lois);
99
		$id_lois = array_map(array($this->bdd, 'proteger'), $id_lois);
100
		$requete = "SELECT * FROM ".Config::get('bdd_table_lois').' '.
100
		$requete = "SELECT * FROM ".Config::get('bdd_table_lois').' '.
101
		           "WHERE id IN (".implode(',',$id_lois).") ORDER BY zone_application ASC";
101
		           "WHERE cd_protection IN (".implode(',',$id_lois).") ORDER BY zone_application ASC";
102
		$lois = $this->bdd->recupererTous($requete, 'ASSOC');
102
		$lois = $this->bdd->recupererTous($requete, 'ASSOC');
103
		foreach ($lois as $loi) {
103
		foreach ($lois as $loi) {
104
			$retour[$loi['id']] = $loi;
104
			$retour[$loi['cd_protection']] = $loi;
105
		}
105
		}
106
		return $retour;
106
		return $retour;
Line 107... Line 107...
107
	}
107
	}
108
	
108
	
109
	private function obtenirLoisZoneGeo(Array $id_lois) {
109
	private function obtenirLoisZoneGeo(Array $id_lois) {
110
		$id_lois = array_map(array($this->bdd, 'proteger'), $id_lois);
110
		$id_lois = array_map(array($this->bdd, 'proteger'), $id_lois);
111
		$requete = "SELECT DISTINCT zone_application, code_zone_application FROM ".Config::get('bdd_table_lois').' '.
111
		$requete = "SELECT DISTINCT zone_application, code_zone_application FROM ".Config::get('bdd_table_lois').' '.
112
			           "WHERE id IN (".implode(',',$id_lois).") ORDER BY zone_application ASC";   
112
			           "WHERE cd_protection IN (".implode(',',$id_lois).") ORDER BY zone_application ASC";   
Line 113... Line 113...
113
		return $this->bdd->recupererTous($requete);
113
		return $this->bdd->recupererTous($requete);
114
	}
114
	}