Skip navigation links

MySQL Forums :: PHP :: Column count doesn't match value count at row 1


Advanced Search

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
Column count doesn't match value count at row 1 Alex Brazier 01/27/2011 06:01PM
Re: Column count doesn't match value count at row 1 Barry Galbraith 01/27/2011 06:39PM
Re: Column count doesn't match value count at row 1 Alex Brazier 01/28/2011 02:19AM
Re: Column count doesn't match value count at row 1 Barry Galbraith 01/28/2011 02:28AM
Re: Column count doesn't match value count at row 1 Alex Brazier 01/28/2011 04:41AM
Re: Column count doesn't match value count at row 1 Barry Galbraith 01/28/2011 04:52AM


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.