From d68b54442522542d06c92f6ef21928058c1a9edc Mon Sep 17 00:00:00 2001 From: grouille Date: Mon, 20 Apr 2020 21:05:02 +0200 Subject: [PATCH] Suppression RPI + capteur --- site/accesBase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/accesBase.php b/site/accesBase.php index 6d2f35a..9fe8ff7 100644 --- a/site/accesBase.php +++ b/site/accesBase.php @@ -262,7 +262,7 @@ { remove($capteur['nom']); } - $query = "REMOVE FROM raspberry WHERE ip = '$ip'"; + $query = "DELETE FROM raspberry WHERE ip = '$ip'"; $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); deconnexion($db); if (pg_affected_rows($result)!=0){ @@ -304,9 +304,9 @@ function remove($nom) { $db = connexion(); - $query = "REMOVE FROM history WHERE sensor = '$nom'"; + $query = "DELETE FROM history WHERE sensor = '$nom'"; $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); - $query = "REMOVE FROM capteurs WHERE nom = '$nom'"; + $query = "DELETE FROM capteurs WHERE nom = '$nom'"; $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); deconnexion($db); if (pg_affected_rows($result)!=0){ -- libgit2 0.21.2