Commit d68b54442522542d06c92f6ef21928058c1a9edc
1 parent
8be7c447
Suppression RPI + capteur
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
site/accesBase.php
... | ... | @@ -262,7 +262,7 @@ |
262 | 262 | { |
263 | 263 | remove($capteur['nom']); |
264 | 264 | } |
265 | - $query = "REMOVE FROM raspberry WHERE ip = '$ip'"; | |
265 | + $query = "DELETE FROM raspberry WHERE ip = '$ip'"; | |
266 | 266 | $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); |
267 | 267 | deconnexion($db); |
268 | 268 | if (pg_affected_rows($result)!=0){ |
... | ... | @@ -304,9 +304,9 @@ |
304 | 304 | function remove($nom) |
305 | 305 | { |
306 | 306 | $db = connexion(); |
307 | - $query = "REMOVE FROM history WHERE sensor = '$nom'"; | |
307 | + $query = "DELETE FROM history WHERE sensor = '$nom'"; | |
308 | 308 | $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); |
309 | - $query = "REMOVE FROM capteurs WHERE nom = '$nom'"; | |
309 | + $query = "DELETE FROM capteurs WHERE nom = '$nom'"; | |
310 | 310 | $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); |
311 | 311 | deconnexion($db); |
312 | 312 | if (pg_affected_rows($result)!=0){ | ... | ... |