title: Delete mysql record older than 30 days
body: <p>How to delete mysql record older than 30 days? my code will delete all the records even which are inserted yesterday. </p>
  
  <pre><code>require('../conn_db.php');
  mysql_select_db("my_news",$conn);
  mysql_query("SET NAMES utf8");
  mysql_query("DELETE FROM my_news WHERE date &lt; DATE_SUB(NOW(), INTERVAL 1 MONTH)");
  mysql_close("my_news");
  </code></pre>
  
  <p>And mysql table</p>
  
  <pre><code>date int(10)
  1321095600
  1322107200
  ...
  1328288400
  1328290440
  </code></pre>