diff --git a/location.php b/location.php index 950b71a..812d496 100644 --- a/location.php +++ b/location.php @@ -15,7 +15,7 @@ if ($conn->connect_error) { $sql = "SELECT ts, lat, lon FROM tracker WHERE device='" . mysqli_real_escape_string($conn, $_GET["device"]) . "' ORDER BY ts DESC LIMIT 1;"; $result = $conn->query($sql); -if ($result->num_rows > 0) { +if ($result->num_rows != 0) { while($row = $result->fetch_assoc()) { print ' @@ -40,6 +40,9 @@ if ($result->num_rows > 0) { L.tileLayer("https://b.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(mymap); var marker = L.marker([' . $row["lat"] . ", " . $row["lon"] . ']).addTo(mymap); + +

All times in UTC' . date('P') . '.

+ '; }