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.
精彩评论