I try to make sense how to connect with a MariaDB.
I use the following node:
I do have connection with my database.
I've created the table in the database.
My function node to inject data in database node:
client = 'client1' project = 'project1' meter_id = 'meter_id1' date = msg.payload; value = 1 msg.topic = "INSERT INTO 'meterdata' ( 'client', 'project', 'meter_id', 'date', 'value') VALUES ( "+ client+", "+ project +", "+ meter_id +", "+ date +", "+ value +");" return msg;
After I inject I get the following message:
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 ''meterdata' ( 'client', 'project', 'meter_id', 'date', 'value') VALUES ( clie...' at line 1
Can someone point me in the right direction?