MySQL Forums
Forum List  »  PHP

Re: Column count doesn't match value count at row 1
Posted by: Barry Galbraith
Date: January 28, 2011 02:28AM

I'm going to assume your id column is an INT AUTO_INCREMENT .
mysql_query("INSERT INTO users (id, username, password, email, website) 
VALUES ( NULL , '$username', '$password1', '$email', '$website')") or die (mysql_error());

Just as useful is this

mysql_query("INSERT INTO users ( username, password, email, website) 
VALUES ( '$username', '$password1', '$email', '$website')") or die (mysql_error());

Good luck,
Barry.



Edited 1 time(s). Last edit at 01/28/2011 04:56AM by Barry Galbraith.

Options: ReplyQuote


Subject
Written By
Posted
Re: Column count doesn't match value count at row 1
January 28, 2011 02:28AM


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.