aboutsummaryrefslogtreecommitdiff
path: root/setup/unix/traccar.xml
diff options
context:
space:
mode:
Diffstat (limited to 'setup/unix/traccar.xml')
-rw-r--r--setup/unix/traccar.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup/unix/traccar.xml b/setup/unix/traccar.xml
index 2ddf6551f..8dfcf6386 100644
--- a/setup/unix/traccar.xml
+++ b/setup/unix/traccar.xml
@@ -152,6 +152,10 @@
SELECT * FROM positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime;
</entry>
+ <entry key='database.selectLatestPosition'>
+ SELECT TOP 1 * FROM positions WHERE deviceId = :deviceId AND protocol IS NOT NULL;
+ </entry>
+
<entry key='database.insertPosition'>
INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes)
VALUES (:deviceId, :protocol, :now, :deviceTime, :fixTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes);