title: How to insert day interval in current date in codeigniter?
body: <p>I need to add the start date and end date in table. So startdate should be current date and the end date is after 30 days from current date. I have tried to do it in following way but it not insert the record in table. </p>
  
  <pre><code> public function insert_details()
        $data = array(
          'tran_id' =&gt; $transaction_id,               
           'start_date' =&gt; CURDATE(),
           'end_date' =&gt; DATE_ADD(CURDATE() + INTERVAL 30 DAY)             
         );    
    $this-&gt;db-&gt;insert('user_payments', $data);
     return $this-&gt;db-&gt;insert_id();
   }
  </code></pre>