title: SQL can't find string that is not empty
body: <p>What's wrong with that line ?</p>
  
  <pre><code>$query = "SELECT * FROM orders ORDER BY id DESC LIMIT 1000 WHERE TRIM(IFNULL(email,'')) &lt;&gt; ''";
  </code></pre>
  
  <p>Basically I want to get all emails from the sql which is NOT an empty row</p>
  
  <p>This is my 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 'WHERE TRIM(IFNULL(email,'')) &lt;&gt; ''' at line 336
  </code></pre>