Mysql 为什么将插入数据(值)视为列名#1054-未知列
上述查询返回错误: #1054-字段列表中的未知列“b”Mysql 为什么将插入数据(值)视为列名#1054-未知列,mysql,insert,mysql-error-1054,Mysql,Insert,Mysql Error 1054,上述查询返回错误: #1054-字段列表中的未知列“b” 引用你的话就行了 INSERT INTO users(`username`, `password`, `location`, `aboutusr`, `gender`) VALUES (`b`,`c`,`d`,`e`,`f`,`h`) 除了数字,您需要在单引号中包含值。 您正试图将6个不同的值保存到5列中。这就是问题所在。试试这个。希望这会有所帮助 INSERT INTO users(username,password,loc
引用你的话就行了
INSERT INTO users(`username`, `password`, `location`, `aboutusr`, `gender`)
VALUES (`b`,`c`,`d`,`e`,`f`,`h`)
除了数字,您需要在单引号中包含值。
您正试图将6个不同的值保存到5列中。这就是问题所在。试试这个。希望这会有所帮助
INSERT INTO users(username,password,location,aboutusr,gender)
VALUES ('b','c','d','e','f','h');
除了单引号问题,您在
INSERT
中有5列,在values
中有6个值。您的代码运行良好,但为什么这不起作用“插入到用户(用户名、密码、电子邮件、位置、性别、Aboutur)值($username、$password、$email、$location、$gender、$Aboutur);”。ps:我用了“谢谢,它起作用了,兄弟,我知道我错在哪里了,我用了”而不是“插入值:*thankshmm,实际上我在用它,只是因为这是我第一次在这个网站上,我仍然不知道如何写它properly@ImadEddin:您正在使用背面记号。反勾号和单引号有区别。此外,您只提到了5个列名,但有6个值。“啊啊啊啊啊啊(当您注意到您的lol多么愚蠢的时候)谢谢兄弟,它起了作用(y)
INSERT INTO users(username,password,location,aboutusr,gender)
VALUES ('b','c','d','e','f','h');
INSERT INTO users(username,password,location,aboutusr,gender) VALUES ('b','c','d','e','f')