I want to insert current time in database using mySQL function NOW() in Codeigniter\'s active record. The following query won\'t work:
$data = array(
Using the date helper worked for me
$this->load->helper('date');
You can find documentation for date_helper here.
date_helper
$data = array( 'created' => now(), 'modified' => now() ); $this->db->insert('TABLENAME', $data);