|
Posted by "Richard Lynch" on 08/25/05 11:03
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
Navigation:
[Reply to this message]
|