MySQL Incorrect datetime value: '0000-00-00 00:00:00'

后端 未结 19 1010
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 15:51

I\'ve recently taken over an old project that was created 10 years ago. It uses MySQL 5.1.

Among other things, I need to change the default character set from latin1

19条回答
  •  渐次进展
    2020-11-29 16:43

    I got it fixed by doing this before the query

    SET SQL_MODE='ALLOW_INVALID_DATES';
    

提交回复
热议问题