title: insert into in node red
body: <p>edited</p>
  
  <p>I'm getting a string variable from a plc in node red via node "s7", the variable should be inserted into a MySQL DB, through the function node I tried to create a "insert into" query but in the database the string appears undefined, I'm new on node red and I do not know what I was wrong with the query below</p>
  
  <pre><code>msg.topic = 
    "INSERT INTO S7_log(commessa_in_produzione) VALUES" + 
    ('"+msg.payload.commessa_in_produzione+"')";
  
  
  return msg;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xy5vC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xy5vC.png" alt="this is the output that I&#39;ve received, the value was: &quot;BAD48&quot;"></a></p>