Commit 460757d3aca34f31c99c74eb1098c96c228f20c3
1 parent
4fb2e38c
MAJ
Showing
2 changed files
with
3 additions
and
4 deletions
Show diff stats
site/accesBase.php
@@ -380,17 +380,17 @@ | @@ -380,17 +380,17 @@ | ||
380 | $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); | 380 | $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); |
381 | $tab = pg_fetch_all($result); | 381 | $tab = pg_fetch_all($result); |
382 | deconnexion($db); | 382 | deconnexion($db); |
383 | - return $tab; | 383 | + return $tab['raspberry']; |
384 | } | 384 | } |
385 | 385 | ||
386 | function getSensorByRaspberry($ip) | 386 | function getSensorByRaspberry($ip) |
387 | { | 387 | { |
388 | $db = connexion(); | 388 | $db = connexion(); |
389 | - $query = "SELECT nom FROM capteurs WHERE raspberry = '$ip'"; | 389 | + $query = "SELECT * FROM capteurs WHERE raspberry = '$ip'"; |
390 | $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); | 390 | $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); |
391 | $tab = pg_fetch_assoc($result); | 391 | $tab = pg_fetch_assoc($result); |
392 | deconnexion($db); | 392 | deconnexion($db); |
393 | - return $tab['nom']; | 393 | + return $tab; |
394 | } | 394 | } |
395 | 395 | ||
396 | function getTime($type) | 396 | function getTime($type) |
site/removeRpi.php
@@ -33,7 +33,6 @@ session_start(); | @@ -33,7 +33,6 @@ session_start(); | ||
33 | 33 | ||
34 | foreach($capteurs as $capteur) | 34 | foreach($capteurs as $capteur) |
35 | { | 35 | { |
36 | - $ini = "2"; | ||
37 | $numero = $capteur['numero']; | 36 | $numero = $capteur['numero']; |
38 | $raspberry = $capteur['raspberry']; | 37 | $raspberry = $capteur['raspberry']; |
39 | $version = $capteur['version']; | 38 | $version = $capteur['version']; |