Commit 54e8779127d59a814a1f2c34f0790372df73f553

Authored by grouille
1 parent 460757d3

MAJ

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
site/accesBase.php
... ... @@ -378,7 +378,7 @@
378 378 $db = connexion();
379 379 $query = "SELECT raspberry FROM capteurs WHERE nom = '$nom'";
380 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_assoc($result);
382 382 deconnexion($db);
383 383 return $tab['raspberry'];
384 384 }
... ... @@ -388,7 +388,7 @@
388 388 $db = connexion();
389 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   - $tab = pg_fetch_assoc($result);
  391 + $tab = pg_fetch_all($result);
392 392 deconnexion($db);
393 393 return $tab;
394 394 }
... ...