title: How to get output from NodeRed Mysql node
body: <p>I want to get out put from NodeRed mysql node.</p>
  
  <p>Here image of connection : 
  <a href="https://i.stack.imgur.com/SZhqn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SZhqn.png" alt="enter image description here"></a></p>
  
  <p>Select Query is :</p>
  
  <pre><code>msg.topic = "SELECT * t.TableID FROM booking t where t.bookingdate='"+formattedDate+"' and t.TableID = 3";
  </code></pre>
  
  <p>Output i am trying to get:</p>
  
  <pre><code>if(msg.payload.TableID ==3){
      var id = "15";
   var message = "Front Desk";
  msg.topic = "INSERT INTO tableMessage(TableID, MESSAGE) VALUES ('"+id+"' ,'"+message+"')";
  
  return msg;
  }
  </code></pre>
  
  <p>Question is <code>msg.payload.TableID ==3</code> is it right? is it right way to read out put from Mysql node</p>
  
  <p>Select query are tested working fine.
  but this condition not working for me. </p>
  
  <p>any one help me how to retrieve data from mysql node.</p>
  
  <p>Thanks</p>