title: Codeigniter 3: delete all rows older than 2 months
body: <p>I'm using codeigniter 3. I want to delete all the rows from table "anwser" that are older than 2 months (datetime in mysql tabel). I don't get an error. But no rows are deleted. 
  Any suggestions?</p>
  
  <p>model:</p>
  
  <pre><code>    function delete_old_anwsers()
  {
      $this-&gt;load-&gt;model('quiz_model');
      $this-&gt;db-&gt;where('datum &lt;', 'strtotime('-2 month')');
      $this-&gt;db-&gt;delete('anwser');
  }
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>$this-&gt;quiz_model-&gt;delete_old_anwsers();
  </code></pre>
  
  <p>Thank you</p>
  
  <p>Solution:</p>
  
  <pre><code>    function delete_old_answer()
  {
      $this-&gt;db-&gt;query("DELETE FROM answer WHERE datum &lt; NOW() - INTERVAL 2 MONTH ");
  }
  </code></pre>