php – MySQL列数与第1行的值计数不匹配

前端之家收集整理的这篇文章主要介绍了php – MySQL列数与第1行的值计数不匹配前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_404_0@ 我正在尝试使用 PHP将数据插入MysqL表,但得到错误

Column count doesn’t match value count at row 1

MysqL_query("INSERT INTO file (id,filename,extention,filelink,filesize,filepass) VALUES('{$random}','{$filename}','{$extension}','{$filelink}','{$filesize}' '{$filepass}') ") or die(MysqL_error());
MysqL_query("INSERT INTO file (id,'{$filesize}' '{$filepass}') ") or die(MysqL_error());

您应该在{$filesize}之后添加缺少的逗号:

MysqL_query("INSERT INTO file (id,'{$filesize}','{$filepass}') ") or die(MysqL_error());
原文链接:https://www.f2er.com/php/135945.html

猜你在找的PHP相关文章