title: Dynamic variables with node-mysql 'WHERE' statement?
body: <p>I'm using node-mysql in my node.js server. </p>
  
  <p>Problem is, I'm trying to pass a javascript variable into my WHERE sql statement and it's not picking it up (for obvious reasons). 
  I've looked through node-mysql documentation, including the SET method, however this won't work as the variable needs to come from javascript code as i would like it to be dynamically inputted by the user.</p>
  
  <p>Any ideas? Code below.. </p>
  
  <p>api.js</p>
  
  <pre><code>         var mysql = require('mysql');
  
              var connection = mysql.createConnection({
                  host: 'my server',
                  user: 'username',
                  password: 'password',
                  database: 'fruits'
              });
              connection.connect()
  
        var blueberriesWeight = "100"
  
              connection.query('SELECT fruit_price FROM fruit WHERE fruit_weight = blueberriesWeight', 
                function(err, result){ 
              console.log(result)
              console.error(err)
              })
  </code></pre>