title: SELECT date greater than today
body: <p>Right now I have the following query:</p>
  
  <pre><code>$sth = $dbh-&gt;prepare('SELECT * from training ORDER BY startDate ASC LIMIT 4');
  </code></pre>
  
  <p>Then, I process it further like this:</p>
  
  <pre><code>if($row['endDate'] &gt; $today &amp;&amp; $row['status'] != '2')
  </code></pre>
  
  <p>How can I combine the <code>if</code> statement into the db query? I'm not sure how to check the <code>endDate</code> and compare it to today's date in the query.</p>