Error: ER_TRUNCATED_WRONG_VALUE

Hello, I need help with a school project.
I am using an HTML POST to send data to nodered. But after some processing, I have BDD errors

My function :

msg.tps = msg.payload; //msg.tps=time seconde (structure BDD type float)
msg.num_prod =msg.payload.Num_prod; //num_prod=2 (structure BDD type int and test text)

msg.topic = "UPDATE production set duree = '"+ msg.tps +"' WHERE num_prod='"+ msg.num_prod +"';"
return [msg];

when i replace num_prod='"+ msg.num_prod +"' BY num_prod='2' It's ok

Error is : erreur Error: ER_TRUNCATED_WRONG_VALUE: Truncated incorrect DOUBLE value: undefined

thanks for your help
sorry for my english i'm french

Welcome to the forum.

Add a Debug node showing what is coming out of your function node and see what it shows.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.