Inserting NOW() into Database with CodeIgniter's Active Record

后端 未结 11 1057
傲寒
傲寒 2020-12-01 02:15

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(
                


        
11条回答
  •  感动是毒
    2020-12-01 02:56

    This is the easy way to handle timestamp insertion

    $data = array('created_on' => date('Y-m-d H:i:s'));
    

提交回复
热议问题