test.php update

remotes/origin/database-api-implementation
Dorian HODIN 2 years ago committed by felixmielcarek
parent d23b28be1c
commit 29db20b337

@ -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
}
Loading…
Cancel
Save