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(
putting NOW() in quotes won't work as Active Records will put escape the NOW() into a string and tries to push it into the db as a string of "NOW()"... you will need to use
$this->db->set('time', 'NOW()', FALSE);
to set it correctly.
you can always check your sql afterward with
$this->db->last_query();