SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'customer' cannot be null

来源:互联网 发布:承德县德鸣大数据小镇 编辑:程序博客网 时间:2024/06/05 22:38
项目开发的时候遇到一个问题:SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'customer' cannot be null,其实是由于插入的时候customer字段为null,但数据库中该字段设置为非空,所以报错,可以将customer字段设置为允许为空就OK了。
0 0
原创粉丝点击