154,14 → 154,14 |
|
private function chercherCentroideCommuneBdd($commune, $departement) { |
|
$commune = str_replace(' ','_',$commune); |
$commune = str_replace('-','_',$commune); |
$commune_formatee = str_replace(' ','_',$commune); |
$commune_formatee = str_replace('-','_',$commune_formatee); |
|
if(strlen($departement) > 2) { |
$departement = substr($departement,0,2); |
} |
$requete_selection_commune = 'SELECT utm_x, utm_y, utm_secteur, code FROM cel_zones_geo '. |
'WHERE nom LIKE '.$this->proteger($commune).' AND code LIKE '.$this->proteger($departement.'%'); |
'WHERE nom LIKE '.$this->proteger($commune_formatee).' AND code LIKE '.$this->proteger($departement.'%'); |
|
$commune_coordonnees = $this->executerRequete($requete_selection_commune); |
|