Insert current date/time using now() in a field using MySQL/PHP

后端 未结 9 1240
不知归路
不知归路 2021-02-01 01:00

Since MySQL evidently cannot automatically insert the function now() in a datetime field in adding new records like some other databases, based on comments, I\'m explicitly tryi

9条回答
  •  攒了一身酷
    2021-02-01 01:44

    The only reason I can think of is you are adding it as string 'now()', not function call now().
    Or whatever else typo.

    SELECT NOW();
    

    to see if it returns correct value?

提交回复
热议问题