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
true
5024
true
5025
true
5026
true
5027
true
5028
true
5029
true
5030
true
5031
true
5032
true
5033
true
5034
true
5035
true
5036
true
5037
true
5038
true
5039
true
5040
true
5041
true
5042
true
5043
true
5044
true
5045
true
5046
true
5047
true
5048
true
5049
true
5050
true
5051
true
5052
true
5053
true
5054
true
5055
true
5056