title: How do I not select some rows in sql using nodejs?
body: <p>I have the code</p>
  <pre><code>  const defer = Q.defer();
      var sql = &quot;SELECT * FROM test WHERE type != ? AND externalUserId != ?&quot;;
      db.query(sql, [options.type, options.externalUserId], (err, result) =&gt; {
          if (err) {
              console.dir(err);
              defer.reject(err);
          } else {
              defer.resolve(result);
          }
      });
      return defer.promise;
  </code></pre>
  <p>I'm trying to select all rows that don't have a certain type. The code above returns the wrong results. Does anyone know why?</p>