title: MYSQL get rows inserted from today
body: <p>I have the following code which keeps displaying 0 although rows are being inserted every day, i need it to work so that it finds what has been added today.</p>
  
  <pre><code>SELECT count(distinct id) AS today 
   FROM exchange 
   WHERE time &gt;= date_sub(now(), interval 0 day)
  </code></pre>
  
  <p>Thanks</p>
  
  <p>today means any time after 00:00 and format is: time();</p>