Hi Rob,
I’m trying to do as you said but it’s not working, maybe it’s a syntax problem. Would you mind giving it a look?
this the the line I have been using to save to the mysql file the other data I need:
local sql = "INSERT INTO info (name, data, datetime) VALUES('" .. txt .. "','" .. currentNumber .. "', '" .. dateTime .. "')" db:exec(sql);
while this is the same string with the new tabledata meant to be saved (and previously serialized):
local tableFactor = {x = operateBy, y = OPERATEbY} local stringTableFactor = json.encode(tableFactor) print (stringTableFactor) local sql = "INSERT INTO info (name, data, datetime, tableoffactors) VALUES('" .. txt .. "','" .. currentNumber .. "', '" .. dateTime .. "', '" ..stringTableFactor.. "')" db:exec(sql);
The string table ‘stringTableFactor’ prints something like this : {“y”:10,“x”:1}
Everything worked and saved fine 'till I added the json string to be saved in the command line, now it doesn’t save anything and returns no errors.
Do you notice anything wrong in the code?
Thaks a lot!!!