Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1310 → Rev 1311

/trunk/jrest/services/CoordSearch.php
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);