开发者

PHP/MySQL Question?

开发者 https://www.devze.com 2022-12-13 20:07 出处:网络
What does the following mean when displayed on the screen? And what are some solutions to correct it? Column count doesn\'t match value count at row 1

What does the following mean when displayed on the screen?

And what are some solutions to correct it?

Column count doesn't match value count at row 1

Code I think is giving me a problem.

$query2 = "INSERT INTO question_tags (tag_id, users_questions_id) VALUES ('$id',(SELECT id FROM tags WHERE tag='" . $tags[$x] . "'), '$page')";

I removed the $id and开发者_运维百科 now I get the following error.

Column 'tag_id' cannot be null


In your query you are specifying 2 columns in the columnslist but then providing 3 values in the value list. Either provide a third column name or remove on the values.


Your column list (tag_id, users_questions_id) has two items. Your values list ('$id',(SELECT id FROM tags WHERE tag='" . $tags[$x] . "'), '$page') has three.

0

精彩评论

暂无评论...
验证码 换一张
取 消