title: Delete all rows with timestamp older than x days
body: <p>I want to delete all the rows with timestamp older than 180 days from a specific table in my database.</p>
  
  <p>I've tried the this:</p>
  
  <pre><code>DELETE FROM on_search WHERE search_date &lt; DATE_SUB(NOW(), INTERVAL 180 DAY);
  </code></pre>
  
  <p>But that deleted all the rows and not only the rows older than 6 months. </p>
  
  <p>I have a column in on_search table called search_date and contains the time when that row was created.</p>
  
  <pre><code>search_id   search_term    search_date 
  660779      car games      1390052553 
  </code></pre>