title: Check if ROW already exists in Database using query > NodeJS
body: <p>I've had this problem for a while now and I can't seem to figure it out, I've looked around on Stackoverflow but could only find either PHP or C# code matching my problem. I'm trying to check if a row exist, if it doesn't then send a message that it does not, if it does send a message that it does.</p>
  
  <p>Here's my code,</p>
  
  <pre><code>query('SELECT * FROM `cases` WHERE `case`='+pool.escape(String(getCase)), function(err, row) {
  
      if(err) {
          logger.error('Error in DB');
          logger.debug(err);
          return;
      }else{
  
          console.log('Case row was found!');
  
      }
  
  });
  </code></pre>
  
  <p>Also, getCase is a variable that I can change, but even when it's not in the database it seems to return <code>Case row was found!</code></p>