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

后端 未结 11 1039
傲寒
傲寒 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:57

    $this->db->query("update table_name set ts = now() where 1=1") also works for current time stamp!

提交回复
热议问题