Re: Error #1136

From: Date: Thu, 25 Aug 2005 08:03:19 +0000
Subject: Re: Error #1136
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-221329@lists.php.net to get a copy of this message
On Wed, August 24, 2005 11:42 am, George B wrote: > Column count doesn't match value count at row 1 > > What does that mean? I have an id auto_increment and it breaks > everytime > because of that error. This has never happend before... If you REALLY don't want to specify all the column names (as suggested by others) you *CAN* use NULL for the auto_increment field value, and MySQL will do the right thing. create table example ( example_id int(11) unsigned auto_increment unique not null primary key, example text ); INSERT INTO example VALUES (NULL, 'This is an example.'); It's probably better to get in the habit of specifying columns, though, because eventually you'll have tables where only SOME columns are known at the time of the initial INSERT, and others will be UPDATEd later, or not at all, depending on the application. So you *CAN* do this, but I'm recommending that you don't. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#221329) next »