开发者

PHP/MySQL Question?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜