Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php MYsql insert语句错误_Php_Mysql_Insert - Fatal编程技术网

Php MYsql insert语句错误

Php MYsql insert语句错误,php,mysql,insert,Php,Mysql,Insert,我在运行insert语句时遇到一个mysql错误。错误是: #1136-列计数与第1行的值计数不匹配。insert有5个值,但注释id设置为AUTO INC insert语句如下所示: insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES ('78', 'm man', 'mon@mon.com', 'testh' 'unapprove') 这张桌子看起来像这样 1) c

我在运行insert语句时遇到一个mysql错误。错误是:

#1136-列计数与第1行的值计数不匹配。insert有5个值,但注释id设置为AUTO INC

insert语句如下所示:

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES ('78', 'm man', 'mon@mon.com', 'testh' 'unapprove')
这张桌子看起来像这样

1) comment_id int(10) AUTO_INCREMENT 2) post_id int(10) 3) comment_name varchar(100) 4) comment_email varchar(100) 5) comment_text (text) 6) status (text) 1) 注释id int(10)自动增量 2) 邮政署助理署长(10) 3) 注释\u name varchar(100) 4) 评论\u电子邮件varchar(100) 5) 注释文本(文本) 6) 状态(文本)
有人能帮忙吗?非常感谢你的努力你犯了一个错误。您忘记在所有值之间设置逗号。更改您的查询来源:

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES ('78', 'm man', 'mon@mon.com', 'testh' 'unapprove')


你犯了一个错误。您忘记在所有值之间设置逗号。更改您的查询来源:

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES ('78', 'm man', 'mon@mon.com', 'testh' 'unapprove')


你犯了一个错误。您忘记在所有值之间设置逗号。更改您的查询来源:

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES ('78', 'm man', 'mon@mon.com', 'testh' 'unapprove')


你犯了一个错误。您忘记在所有值之间设置逗号。更改您的查询来源:

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES ('78', 'm man', 'mon@mon.com', 'testh' 'unapprove')


您应该在“testh”之后添加逗号,因为它是comment_文本字段的值

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES 
                     ('78', 'm man', 'mon@mon.com', 'testh', 'unapprove')

您应该在“testh”之后添加逗号,因为它是comment_文本字段的值

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES 
                     ('78', 'm man', 'mon@mon.com', 'testh', 'unapprove')

您应该在“testh”之后添加逗号,因为它是comment_文本字段的值

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES 
                     ('78', 'm man', 'mon@mon.com', 'testh', 'unapprove')

您应该在“testh”之后添加逗号,因为它是comment_文本字段的值

insert INTO comments (post_id, comment_name, comment_email, comment_text, status) VALUES 
                     ('78', 'm man', 'mon@mon.com', 'testh', 'unapprove')

您必须将查询修改到此

您必须将查询修改到此

您必须将查询修改到此

您必须将查询修改到此

您在values子句中缺少逗号。您在values子句中缺少逗号。您在values子句中缺少逗号。您在values子句中缺少逗号。您在values子句中缺少逗号条款
insert INTO comments VALUES (NULL, '78', 'm man', 'mon@mon.com', 'testh',  'unapprove')