From bf68718e05f811ffeb2b4b57acab56dca3e7de56 Mon Sep 17 00:00:00 2001 From: Gábor Somogyi Date: Wed, 27 Apr 2016 22:22:08 +0200 Subject: Command framework ugly hack version --- setup/unix/traccar.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'setup/unix') 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; + + SELECT TOP 1 * FROM positions WHERE deviceId = :deviceId AND protocol IS NOT NULL; + + 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); -- cgit v1.2.3