From 883a482436b6bdc4b30a09a82d139282e556f435 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Tue, 29 Nov 2022 13:50:43 +0100 Subject: [PATCH] test.php and insertAndMakeListUser.php update --- Sources/php_script/script/insertAndMakeListUser.php | 2 +- Sources/php_script/script/test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/php_script/script/insertAndMakeListUser.php b/Sources/php_script/script/insertAndMakeListUser.php index 4558869..0382e23 100644 --- a/Sources/php_script/script/insertAndMakeListUser.php +++ b/Sources/php_script/script/insertAndMakeListUser.php @@ -48,7 +48,7 @@ function insertUserAndReturnList(): array|int $longitude = doubleval($longitude); //Convert a string to a double $query = "DELETE FROM gps WHERE (TIMESTAMPDIFF(MINUTE,dateLog,CURRENT_TIMESTAMP)<10;"; - $mysqli_query($connect, $query); + mysqli_query($res, $query); $query = "SELECT id FROM gps WHERE id = '$id' "; $results = mysqli_query($res, $query); //Execute the SQL command diff --git a/Sources/php_script/script/test.php b/Sources/php_script/script/test.php index b976b54..56bd8ef 100644 --- a/Sources/php_script/script/test.php +++ b/Sources/php_script/script/test.php @@ -6,7 +6,7 @@ $res = connection(); $query = "SELECT * FROM gps WHERE (TIMESTAMPDIFF(MINUTE,dateLog,CURRENT_TIMESTAMP)<10;"; -$results = $mysqli_query($connect, $query); +$results = mysqli_query($res, $query); while ($row = $results->fetch_row()) { //For all the row in the database