Commit 460757d3aca34f31c99c74eb1098c96c228f20c3

Authored by grouille
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 380 $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error());
381 381 $tab = pg_fetch_all($result);
382 382 deconnexion($db);
383   - return $tab;
  383 + return $tab['raspberry'];
384 384 }
385 385  
386 386 function getSensorByRaspberry($ip)
387 387 {
388 388 $db = connexion();
389   - $query = "SELECT nom FROM capteurs WHERE raspberry = '$ip'";
  389 + $query = "SELECT * FROM capteurs WHERE raspberry = '$ip'";
390 390 $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error());
391 391 $tab = pg_fetch_assoc($result);
392 392 deconnexion($db);
393   - return $tab['nom'];
  393 + return $tab;
394 394 }
395 395  
396 396 function getTime($type)
... ...
site/removeRpi.php
... ... @@ -33,7 +33,6 @@ session_start();
33 33  
34 34 foreach($capteurs as $capteur)
35 35 {
36   - $ini = "2";
37 36 $numero = $capteur['numero'];
38 37 $raspberry = $capteur['raspberry'];
39 38 $version = $capteur['version'];
... ...