title: select records with date in the last 24 hours
body: <p>I want to select from my table all records where date (datetime mysql format YYYY-MM-DD HH:MM:SS) is in the last 24 hours. I have a query, but it doesn't completely work</p>
  
  <pre><code> SELECT * FROM `my_table` WHERE date &gt; DATE_SUB(NOW(), INTERVAL 24 HOUR)
  </code></pre>
  
  <p>why it returns the date like that 2013-07-01 12:00:00. How would I do this? Thanks.</p>