MySQL Forums
Forum List  »  PHP

Re: Column count doesn't match value count at row 1
Posted by: Barry Galbraith
Date: January 27, 2011 06:39PM

your query
mysql_query("INSERT INTO users (id, username, password, email, website) 
VALUES ('', '{$username}', '{$password1}', '{$email}', '{$website}', NOW());") or die (mysql_error());

Gives 5 fields, but you list 6 values.
That's why the error tells you the column count doesn't match the value count.

BTW, if your id column is type INT, you don't need the quotes for the value for that field.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: Column count doesn't match value count at row 1
January 27, 2011 06:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.