From 54fe3e8cca8bcf538a90a2a6ec07762dc6619013 Mon Sep 17 00:00:00 2001 From: JHCD Date: Fri, 22 May 2015 21:38:35 +0200 Subject: [PATCH] bugfix in MySQL plugin --- plugins/MySQL/MySQL.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/MySQL/MySQL.py b/plugins/MySQL/MySQL.py index bbe855f..be19b3e 100644 --- a/plugins/MySQL/MySQL.py +++ b/plugins/MySQL/MySQL.py @@ -36,7 +36,8 @@ def run(typ,freq,data): elif typ == "ZVEI": #data = {"zvei":zvei_id} - cursor.execute("INSERT INTO "+globals.config.get("MySQL","tableZVEI")+" (time,zvei) VALUES (NOW(),%s)",(data["zvei"])) + #Don't use %s here (bug in mysql-lib with one parameter) + cursor.execute("INSERT INTO "+globals.config.get("MySQL","tableZVEI")+" (time,zvei) VALUES (NOW(),"+(data["zvei"])+")") elif typ == "POC": #data = {"ric":poc_id, "function":poc_sub, "msg":poc_text}