how to use mysql now() function in cakephp for date fields?

后端 未结 5 1703
我寻月下人不归
我寻月下人不归 2021-01-21 12:02

I have this code in my cakephp project:

$this->data[\'MyObject\'][\'expire_date\'] = \'NOW()\';

and...

$this->MyObject-&g         


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-01-21 12:44

    $this->data['MyObject']['expire_date'] = strtotime('now');
    

提交回复
热议问题