Committing Database Transaction

pull/4/head
sgoudham 4 years ago
parent 044b6305ae
commit 5a1684189e

@ -71,6 +71,7 @@ async def on_message(message):
cursor = conn.cursor() cursor = conn.cursor()
# Execute the SQL Query # Execute the SQL Query
cursor.execute(insert_query, val) cursor.execute(insert_query, val)
conn.commit()
print(cursor.rowcount, "Record inserted successfully into Logs") print(cursor.rowcount, "Record inserted successfully into Logs")
except mariadb.Error as ex: except mariadb.Error as ex:

Loading…
Cancel
Save