com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/[DATABASE]?allowMultiQueries=true
[USER]
[PASSWORD]
300
SELECT imeiNumber AS id, imeiNumber AS imei FROM Device WHERE imeiNumber <> '';
START TRANSACTION;
UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP(:time), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = :device_id;
SELECT @accountID := accountID, @deviceID := deviceID FROM Device WHERE imeiNumber = :device_id;
INSERT INTO EventData (accountID, deviceID, timestamp, statusCode, latitude, longitude, speedKPH, heading, altitude, rawData, creationTime, address)
VALUES (@accountID, @deviceID, UNIX_TIMESTAMP(:time), 0, :latitude, :longitude, :speed, :course, :altitude, '', UNIX_TIMESTAMP(NOW()), :address);
COMMIT;
DO 0;
false
true
false
true
5000
true
5001
true
5002
true
5003
true
5004
true
5005
true
5006
true
5007
true
5008
true
5009
true
5010
true
5011
true
5012
true
5013
true
5014
true
5015
true
5016
true
5017
true
5018
true
5019
true
5020
true
5021
true
5022
true
5023