Data Stored in MySQL

Sir my main motive is that real time sensor data stored in MySQL data base but i am phasing a problem that is
10/3/2019, 12:40:25 PMnode: 6202ac64.340544INSERT INTO iaqm_ceeri (Tem,Hum,Hi,Co,Co2,Aqi) VALUES ('undefined','undefined','undefined','undefined','undefined','undefined') : msg.payload : OkPacket
"[object Object]".

Please help me.

What is the message that you are sending to the SQL node?
Please make sure you show the msg.topic
and the Path to the data you want to insert

Sending a sensor data.
This is my flow chart please see and give me a solution.

[{"id":"773ab736.c0b3a8","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"5af16165.f7278","type":"mqtt in","z":"773ab736.c0b3a8","name":"","topic":"INDIA/CSIR/CEERI/Sensor","qos":"2","datatype":"auto","broker":"92d1a14e.2a624","x":370,"y":460,"wires":[["cfb0ffc5.26cdc"]]},{"id":"cfb0ffc5.26cdc","type":"join","z":"773ab736.c0b3a8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\n","joinerType":"str","accumulate":false,"timeout":"","count":"6","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":460,"wires":[["aed33477.76ed48"]]},{"id":"aed33477.76ed48","type":"function","z":"773ab736.c0b3a8","name":"","func":"msg.topic="INSERT INTO iaqm_ceeri (Tem,Hum,Hi,Co,Co2,Aqi) VALUES ('"+ msg.payload["ns=2;s=Temperature"] +"','"+ msg.payload["ns=2;s=Humidity"] +"','"+ msg.payload["ns=2;s=HI"] +"','"+ msg.payload["ns=2;s=CO"] +"','"+ msg.payload["ns=2;s=CO2"] +"','"+ msg.payload["ns=2;s=AQI"] +"')";\n//msg.topic="INSERT INTO iaqm_ceeri (Tem,Hum,Hi,Co,Co2,Aqi) VALUES ('"+ msg.payload[0] +"','"+ msg.payload[1] +"','"+ msg.payload[2] +"','"+ msg.payload[3] +"','"+ msg.payload[4] +"','"+ msg.payload[6] +"')";\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":460,"wires":[["112408e1.7ec387"]]},{"id":"112408e1.7ec387","type":"mysql","z":"773ab736.c0b3a8","mydb":"574e05d9.e84d9c","name":"","x":930,"y":460,"wires":[["49cdabed.2bc354"]]},{"id":"49cdabed.2bc354","type":"debug","z":"773ab736.c0b3a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":460,"wires":},{"id":"92d1a14e.2a624","type":"mqtt-broker","z":"","name":"","broker":"192.168.11.20","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"574e05d9.e84d9c","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"sensor","tz":""}]

Please export your flow again, read this post and edit your post.

read this post but i dont got an answer

That post explains what you must do to format your flow in this forum so that someone else can import it.
Without you doing that we cannot use your flow.

You have also ignored my post where I ask for the message (ie data)

2 Likes

i dont ignore your post.