Dear All
after one day of normal behaviour I got this error from Mysql Node.
"Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?)' at line 1"
The sql code is :
msg.topic= "INSERT INTO batteria (valore) Values (?)";
The version of the node Mysql is 0.1.9
Node-RED version: v1.3.5
27 May 19:50:14 - [info] Node.js version: v12.22.1
27 May 19:50:14 - [info] Linux 5.10.17-v7+ arm LE
Please add a debug Node - set to display the complete msg object - to the node feeding the mysql node and run it again. Then copy the opupit and paste it to a response.
"Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?)' at line 1"
Thanks, it worked.
I read the readme, and I was misled by the sentence: "Typically the returned payload will be an array of the result rows."
I interpreted typically as an option not as a mandatory structure.
That isn't the relevant part, that is talking about what comes out of the node. It is the example in the readme under Preparing Queries where it shows the payload as an array that is relevant.
You said at the start that it worked ok for a day and then stopped working, I don't understand how that can be the case. I would not have expected it ever to have worked as you had it.
Actually, I simplified the data storage as some were redundant.
The fact that an array was needed was completely unclear to me.
Thanks for the support.