title: MySQL Select all where DATETIME field is not NULL
body: <p>I am having trouble selecting the proper values from this query:</p>
  
  <pre><code>SELECT * FROM discounts 
  WHERE DiscLimit &gt; 0 AND DiscLimit &gt;= DiscRedeemed 
  OR DiscExp IS NOT NULL AND DiscExp &lt;= NOW()
  </code></pre>
  
  <p><code>DiscExp</code> is a <code>DATETIME</code> field that defaults to <code>NULL</code>.</p>
  
  <p>I am trying to select current unexpired discounts from the database:</p>
  
  <p><code>SELECT * FROM discounts WHERE</code>:</p>
  
  <ol>
  <li>The limit is > 0 (a limit exists) AND the limit is >= the number
  redeemed </li>
  <li>An expiration exists (not null) and the expiration is in
  the future</li>
  </ol>
  
  <p>It seems to be retrieving values where the <code>DATETIME</code> field is <code>NULL</code>. Any help would be much appreciated.</p>