title: SELECT WHERE IN in node-mysql
body: <p>Does anyone know how to use <code>SELECT WHERE IN</code> in node-mysql?</p>
  
  <p>I've tried the code below, but I get the following error message:</p>
  
  <pre><code>'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''(`PHP`,`apache`)'' at line 1'
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>whereIn = '(';
  for ( var i in tagArray ) {
      if ( i != tagArray.length - 1 ) {
          whereIn += "`" + tagArray[i] + "`,";    
      }else{
          whereIn += "`" + tagArray[i] + "`"; 
      }
  }
  whereIn += ')';
  
  console.log(whereIn);
  
  client.query(
      'SELECT tag_id FROM tag WHERE tag_name IN ?',
      [whereIn],
      function(err, result, fields) {
          client.destroy();
  
          if (err) {
              throw err;
          }
  
          console.log(result);
  
          res.redirect('/');
      }
  );
  </code></pre>