#1366

编程入门 行业动态 更新时间:2024-10-23 14:26:27
本文介绍了#1366-错误的整数值:第1行的"cid"列为"NULL"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经使用XAMPP安装了MyBB local,并且运行顺利.但是,当我在服务器上执行此操作时,它会给我错误.

I have installed MyBB local using XAMPP and it goes smoothly. But when I do it on the server it give me errors.

MyBB自己创建并插入了大量数据,我发现错误出在以下查询中:

MyBB creates and inserts a lot of data by itself and I found out the errors are in queries like:

INSERT INTO... VALUES ('NULL', ...)

在我的本地主机MySQL上(两者均为5.5.27)接受这种查询,其中'NULL'作为字符串传递.但是在服务器中,如标题所示,它会显示错误#1366.

On my localhost MySQL (which is 5.5.27 for both) accepts this kind of query, where 'NULL' is passed as a String. But in the server it gives an error #1366 as the title says.

问题在于更改查询不是一个选择,因为它是很多查询,所以任何人都可以将其配置为可以工作的一个主意?

The problem is that changing the query is not an option since it is A LOT of queries, so anyone has an idea where I can configure this to work?

谢谢.

推荐答案

问题是对于MySQL(在这种情况下) 'NULL'与NULL 不同.

The problem is that for MySQL (in this case) 'NULL' is not the same as NULL.

由于该列需要数字数据,因此您的语句不起作用,而以下内容将起作用:

Due to the fact that the column is expecting numeric data your statement does not work while the following would work:

INSERT INTO ... VALUES (NULL, ...)

......也许您可以更改服务器的MySQL模式正在运行.

... maybe you can change the MySQL mode the server is running on.

更多推荐

#1366

本文发布于:2023-10-24 13:48:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524106.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!