title: Date filtering doesn't work in mysql, php
body: <p>I have a site where I want to show articles that have been posted the last 24 hours. I thought it would be easy but I cannot understand what I am doing wrong.</p>
  
  <p>Lets start from the begining, in mysql I have this table:</p>
  
  <pre><code>id | editor | article | date
  -----------------------------
  128|   8    |  ....   | 2013-03-20 01:01:26
  129|   8    |  ....   | 2013-03-20 01:03:24
  </code></pre>
  
  <p>date field is TIMESTAMP.</p>
  
  <p>Now in php I have this code:</p>
  
  <pre><code>$date = date('Y-m-d H:i:s', strtotime('-1 day')); //24 hours ago
  $articles = mysql_query("SELECT * FROM articles WHERE editor=8 AND 'date' &gt; '".$date."' ORDER BY id DESC");
  </code></pre>
  
  <p>If I run this code now that my local timestamp is "2013-03-21 15:20:07" (more than 24 hours than the articles timestamp) I still get the articles, although I shouldn’t because  2013-03-20 01:01:26 (article 128 timestamp) &lt; 2013-03-20 15:20:07 (now - 1 day). I also run the code through phpmyadmin and the results where the same.</p>
  
  <p>I cannot see what I am doing wrong, I tried experimenting with other tables of my database that have date fields and I still couldn't get it to work.</p>
  
  <p>Thanks a lot.</p>