Home  >  Article  >  Backend Development  >  sql保存数据出错

sql保存数据出错

WBOY
WBOYOriginal
2016-06-20 12:35:43879browse


回复讨论(解决方案)

event_order 不能为空
你即没有给他设置默认值,也没有对他赋值

错误提示有已经很明显了。
Field 'event_order' doesn't have a default value

字段 event_order 为空且没有默认值。

event_order 不能为空
你即没有给他设置默认值,也没有对他赋值



错误提示有已经很明显了。
Field 'event_order' doesn't have a default value

字段 event_order 为空且没有默认值。



我在本地不会出现这个问题,而在线上项目就会报这个错误
在本地event_order没填时默认为空
线上的项目代码和sql跟本地一样

有可能sql_mode设置不同,参考: http://blog.csdn.net/fdipzone/article/details/50616247

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn