title: How to input a NodeJS variable into an SQL query
body: <p>I want to write an SQL query that contains a NodeJS variable. When I do this, it gives me an error of 'undefined'.</p>
  
  <p>I want the SQL query below to recognize the <code>flightNo</code> variable. How can a NodeJS variable be input into an SQL query? Does it need special characters around it like <code>$</code> or <code>?</code>.</p>
  
  <pre><code>app.get("/arrivals/:flightNo?", cors(), function(req,res){
  var flightNo = req.params.flightNo;
  
  connection.query("SELECT * FROM arrivals WHERE flight = 'flightNo'", function(err, rows, fields) {
  </code></pre>