I'm learning Node-RED, i've hit a wall with this error -
"Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Timestamp','Values')VALUES('07/12/2022, 13:58:08', 13)' at line 1"
It is a very basic flow, first of all i was writing only the value to mySQL and had no problems.
I've now added a second column called 'Timestamp' and i'm returning the error above.
Where it refers to 'line 1' in the error message, does that mean the issue lies within the first line of the code, i.e. value1? If so, that is very strange because i have been recording that value in a single column to test it for a few days. The issue has only appeared since adding the second column in mySQL.
The DATETIME type is used for values that contain both date and time parts. MySQL retrieves and displaysDATETIME values in 'YYYY-MM-DD hh:mm:ss' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'
It looks like your date time is mm-did-yyyy format when it should Year first
Debugging a SQL query
Go to the line that is failing in your SQL query.
Check the SQL syntax on the line that is failing in your SQL query.
Check your query logic if the query uses joins, subqueries, or CTEs.
If you get an error message that isn't specific to your SQL query, go to Troubleshooting error messages.