Hi to all, i'm newbie on node red and JS and i'm writing to you for some help with node red and mysql query.
it's 2 days i'm googling but i can't find solution.
My problem is to built query string dynamically from many nodes or key/value object from node-join result.
I want to do this beacuse i need to write data in to mysqlDB many times in different tables and i would to use one function to do this work without write every time a new function to create query string.
I have many inputs (from text, number, date, switch etc) some times 8 some times 12 some times 20 input nodes.
every one is set with msg.topic like column name in the db and with the join node I create an object with key/value pairs
i.e. {"temp":26.5,"humid":75,"text":"prova","boolean":true,"count":6}
i want to use this to built a INSERT query to write in the corresponding table db like:
INSERT INTO tablename (temp, humid, text, bool, count) VALUE ("....","....",......
some help?
many thanks