列计数与第 1 行错误消息中的值计数不匹配,php / sql

Column count doesn't match value count at row 1 error message, php / sql

我必须使用 PHP 和 MySQL workbench 制作网页来收集表单数据,但我不断收到此错误:

INSERT INTO tools ( id, tool1, tool2, tool3, tool4, tool5, tool6, tool7, tool8, tool9, tool10) VALUES ( '0','1', '2', '3', '4,' '5', '6', '7', '8', '9', '10')

INSERT failed: INSERT INTO tools ( id, tool1, tool2, tool3, tool4, tool5, tool6, tool7, tool8, tool9, tool10) VALUES ( '0','1', '2', '3', '4,' '5', '6', '7', '8', '9', '10')

Column count doesn't match value count at row 1

我的代码是这样的:

$query = "INSERT INTO tools ( id, tool1, tool2, tool3, tool4, tool5, tool6, tool7, tool8, tool9, tool10) VALUES ( '0','1', '2', '3', '4,' '5', '6', '7', '8', '9', '10')";

这就是它在 workbench 中的样子:

INSERT INTO tools (id, tool1, tool2, tool3, tool4, tool5, tool6, tool7, tool8, tool9, tool10) VALUES ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);

我试过没有 id 和 0 值,但都不起作用。有谁知道如何解决这个问题?

您的代码

INSERT INTO tools ( id, tool1, tool2, tool3, tool4, tool5, tool6, tool7, tool8, tool9, tool10) 
VALUES ( '0','1', '2', '3', '4,' '5', '6', '7', '8', '9', '10')

正好在 4 到 5 之间有一个错误,撇号错位

一定是这样的

INSERT INTO tools ( id, tool1, tool2, tool3, tool4, tool5, tool6, tool7, tool8, tool9, tool10) 
VALUES ( '0','1', '2', '3', '4', '5', '6', '7', '8', '9', '10')