55,14 → 55,14 |
$requete_creation_station = 'INSERT INTO ods_stations '. |
'(os_ce_participant, os_nom, os_ce_commune, os_latitude, os_longitude, os_altitude, os_ce_environnement, os_commentaire) '. |
'VALUES ('. |
$this->bdd->quote($id_participant).','. |
$this->bdd->quote($params['station_nom']).','. |
$this->bdd->quote($params['station_commune']).','. |
$this->bdd->quote($params['station_lat']).','. |
$this->bdd->quote($params['station_lon']).','. |
$this->bdd->quote($params['station_alt']).','. |
$this->bdd->quote($params['station_milieu']).','. |
$this->bdd->quote($params['station_description']).')'; |
$this->proteger($id_participant).','. |
$this->proteger($params['station_nom']).','. |
$this->proteger($params['station_commune']).','. |
$this->proteger($params['station_lat']).','. |
$this->proteger($params['station_lon']).','. |
$this->proteger($params['station_alt']).','. |
$this->proteger($params['station_milieu']).','. |
$this->proteger($params['station_description']).')'; |
|
$creation_station = $this->executerRequeteSimple($requete_creation_station); |
|
93,15 → 93,15 |
|
$requete_modification_station = 'UPDATE ods_stations '. |
'SET '. |
'os_nom ='.$this->bdd->quote($params['station_nom']).','. |
'os_latitude ='.$this->bdd->quote($params['station_commune']).','. |
'os_latitude ='.$this->bdd->quote($params['station_lat']).','. |
'os_longitude ='.$this->bdd->quote($params['station_lon']).','. |
'os_altitude ='.$this->bdd->quote($params['station_alt']).','. |
'os_ce_environnement ='.$this->bdd->quote($params['station_milieu']).','. |
'os_commentaire ='.$this->bdd->quote($params['station_description']).' '. |
'WHERE os_ce_particant = '.$this->bdd->quote($id_participant).' '. |
'AND os_id_station = '.$this->bdd->quote($id_station); |
'os_nom ='.$this->proteger($params['station_nom']).','. |
'os_latitude ='.$this->proteger($params['station_commune']).','. |
'os_latitude ='.$this->proteger($params['station_lat']).','. |
'os_longitude ='.$this->proteger($params['station_lon']).','. |
'os_altitude ='.$this->proteger($params['station_alt']).','. |
'os_ce_environnement ='.$this->proteger($params['station_milieu']).','. |
'os_commentaire ='.$this->proteger($params['station_description']).' '. |
'WHERE os_ce_particant = '.$this->proteger($id_participant).' '. |
'AND os_id_station = '.$this->proteger($id_station); |
|
$modification_station = $this->executerRequeteSimple($requete_creation_station); |
|
133,8 → 133,8 |
} |
|
$requete_suppression_station = 'DELETE FROM ods_stations '. |
'WHERE os_ce_particant = '.$this->bdd->quote($id_participant).' '. |
'AND os_id_station = '.$this->bdd->quote($id_station); |
'WHERE os_ce_particant = '.$this->proteger($id_participant).' '. |
'AND os_id_station = '.$this->proteger($id_station); |
|
// TODO : supprimer également tout ce qui est associé à la station (observations, etc...) |
$suppression_station = $this->executerRequeteSimple($requete_suppression_station); |
152,7 → 152,7 |
// METHODES D'ACCES A LA BASE DE DONNEES |
private function obtenirListeStationPourParticipant($id_participant) { |
|
$requete_liste_station = 'SELECT * FROM ods_stations WHERE os_ce_participant = '.$this->bdd->quote($id_participant); |
$requete_liste_station = 'SELECT * FROM ods_stations WHERE os_ce_participant = '.$this->proteger($id_participant); |
|
$liste_station = $this->executerRequete($requete_liste_station); |
|
169,7 → 169,7 |
|
private function obtenirInformationsStation($id_station) { |
|
$requete_infos_station = 'SELECT * FROM ods_stations WHERE os_id_station = '.$this->bdd->quote($id_station); |
$requete_infos_station = 'SELECT * FROM ods_stations WHERE os_id_station = '.$this->proteger($id_station); |
|
$infos_station = $this->executerRequete($requete_infos_station); |
|
202,7 → 202,7 |
|
private function obtenirInformationsCommuneParId($id_commune) { |
|
$requete_infos_commune = 'SELECT * FROM ods_communes WHERE oc_id_commune = '.$this->bdd->quote($id_commune); |
$requete_infos_commune = 'SELECT * FROM ods_communes WHERE oc_id_commune = '.$this->proteger($id_commune); |
$infos_commune = $this->executerRequete($requete_infos_commune); |
|
return $infos_commune; |
210,7 → 210,7 |
|
private function obtenirInformationsCommuneParCodeInsee($code_insee_commune) { |
|
$requete_infos_commune = 'SELECT * FROM ods_communes WHERE oc_code_insee = '.$this->bdd->quote($code_insee_commune); |
$requete_infos_commune = 'SELECT * FROM ods_communes WHERE oc_code_insee = '.$this->proteger($code_insee_commune); |
$infos_commune = $this->executerRequete($requete_infos_commune); |
|
return $infos_commune; |