diff --git a/Sources/php_script/script/test.php b/Sources/php_script/script/test.php index 1ef03ff..a76b8c7 100644 --- a/Sources/php_script/script/test.php +++ b/Sources/php_script/script/test.php @@ -4,11 +4,13 @@ include "config.php"; $res = connection(); -$query = "SELECT * FROM gps WHERE (TIMESTAMPDIFF(MINUTE,dateLog,CURRENT_TIMESTAMP)>10);"; +$query = "SELECT id,TIMESTAMPDIFF(MINUTE,dateLog,CURRENT_TIMESTAMP) FROM gps WHERE (TIMESTAMPDIFF(MINUTE,dateLog,CURRENT_TIMESTAMP)>10);"; $results = mysqli_query($res, $query); while ($row = $results->fetch_row()) { //For all the row in the database - print($row[0]); //Set $lat2 to the latitude of the user who is in the actual row + print($row[0]); + print($row[1]); //Set $lat2 to the latitude of the user who is in the actual row + //Set $lat2 to the latitude of the user who is in the actual row } \ No newline at end of file