From e18a2e460c1798c69cfe6d86b790f69e64e36660 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Tue, 18 Jun 2013 19:09:09 -0700 Subject: [PATCH] Fix SQL bug introduced with AC type addition --- python/sql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sql.py b/python/sql.py index 0f240ad..3f0ffb3 100644 --- a/python/sql.py +++ b/python/sql.py @@ -77,6 +77,7 @@ class output_sql: query = self.make_insert_query(message) if query is not None: c = self._db.cursor() + print query c.execute(query) c.close() # self._db.commit() @@ -110,7 +111,7 @@ class output_sql: if bdsreg == 0x08: (msg, typename) = air_modes.parseBDS08(data) - return "INSERT OR REPLACE INTO ident (icao, ident) VALUES (" + "%i" % icao24 + ", '" + msg + "')" + return "INSERT OR REPLACE INTO ident (icao, ident, type) VALUES (" + "%i" % icao24 + ", '" + msg + "', '" + typename + "')" elif bdsreg == 0x06: [ground_track, decoded_lat, decoded_lon, rnge, bearing] = air_modes.parseBDS06(data, self._cpr) altitude = 0