Subversion Repositories eFlore/Applications.cel

Rev

Rev 1517 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1500 delphine 1
<?php
2
class Dao extends Bdd {
3
 
4
 
5
 
6
	public function rechercherCoordonnees() {
7
		$requete = "SELECT longitude, latitude
8
					FROM `cel_obs`
9
					GROUP BY `longitude` , `latitude`";
10
		$resultat = $this->recupererTous($requete);
11
		return $resultat;
12
	}
13
 
14
	public function creerColonneCodeInseeCalculee() {
15
		$create = "ALTER TABLE `cel_obs` ADD `code_insee_calcule` VARCHAR( 5 ) NOT NULL";
16
		$this->requeter($create);
17
	}
18
 
19
	public function ajouterCodeInseeCalculee($latitude, $longitude, $code_insee) {
20
		$insert = "UPDATE `cel_obs` SET `code_insee_calcule` = '$code_insee' ".
21
					"WHERE latitude = '$latitude' AND longitude = '$longitude'";
22
		$this->requeter($insert);
23
	}
24
 
25
	public function modifierCodeInsee() {
26
		$update = "UPDATE `cel_obs` SET ce_zone_geo=concat('INSEE-C:' ,`code_insee_calcule`) ".
27
						"WHERE  ce_zone_geo= '' ";
28
		$this->requeter($update);
29
	}
30
 
31
 
32
 
33
}
34
?>