Subversion Repositories Sites.obs-saisons.fr

Compare Revisions

Ignore whitespace Rev 209 → Rev 210

/trunk/applications/jrest/services/OdsStation.php
149,27 → 149,23
* Méthode appelée pour supprimer un élément
*/
public function deleteElement($uid) {
// Pour le moment, pas de suppression des stations
return ;
if(!isset($uid[0])) {
if(isset($uid[0])) {
$id_participant = $uid[0];
} else {
return;
}
if(!isset($uid[1])) {
if(isset($uid[1])) {
$id_station = $uid[1];
} else {
return;
}
$requete_suppression_station = 'DELETE FROM ods_stations '.
'WHERE os_ce_particant = '.$this->proteger($id_participant).' '.
'WHERE os_ce_participant = '.$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);
if(!$suppression_station) {
180,9 → 176,6
}
// +---------------------------------------------------------------------------------------------------------------+
// 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->proteger($id_participant);