Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1327 Rev 1404
Line 398... Line 398...
398
		preg_match('/(.*) \(([0-9][0-9]*)\)/',$identifiant_commune,$elements);
398
		preg_match('/(.*) \(([0-9][0-9]*)\)/',$identifiant_commune,$elements);
Line 399... Line 399...
399
	
399
	
400
		if (isset($elements[1])) { // commune + departement : montpellier (34)
400
		if (isset($elements[1])) { // commune + departement : montpellier (34)
401
			$nom_commune=$elements[1];
401
			$nom_commune=$elements[1];
402
			$code_commune=$elements[2];
402
			$code_commune=$elements[2];
403
	 	    $requete="SELECT DISTINCT nom, code  FROM cel_zone_geo WHERE nom = ".$this->proteger($nom_commune)." AND code LIKE ".$this->proteger($code_commune.'%');
403
	 	    $requete="SELECT DISTINCT nom, code  FROM cel_zones_geo WHERE nom = ".$this->proteger($nom_commune)." AND code LIKE ".$this->proteger($code_commune.'%');
404
		}
404
		}
405
		else { // Code insee seul 
405
		else { // Code insee seul 
406
	        preg_match('/([0-9][0-9]*)|(2A[0-9][0-9]*)|(2B[0-9][0-9]*)/',$identifiant_commune,$elements);
406
	        preg_match('/([0-9][0-9]*)|(2A[0-9][0-9]*)|(2B[0-9][0-9]*)/',$identifiant_commune,$elements);
407
	        if (isset($elements[1])) { // code insee  commune
407
	        if (isset($elements[1])) { // code insee  commune