Re: Error #1136

From: Date: Wed, 24 Aug 2005 16:57:39 +0000
Subject: Re: Error #1136
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-221290@lists.php.net to get a copy of this message
Can you include the SQL statement that is creating the error? The error basically means you are trying to put more data into the dB then you have data cells for. For instance : Good sql statement: $sql = "insert into table (name, address, city, state, zip) VALUES ('$name', '$address', '$city', '$state', '$zip')"; Bad SQL statement : $sql = " insert into table (name, address, city, state, zip) VALUES ('$name', '$address', '$city', '$state', '$zip', '$phone')"; The addition of the phone variable would create an error since there is no column to hold that data. <?php /* Stephen Johnson c | eh The Lone Coder http://www.ouradoptionblog.com Join our journey of adoption http://www.thelonecoder.com stephen@thelonecoder.com continuing the struggle against bad code */ ?> > From: George B <geoizil@gmail.com> > Date: Wed, 24 Aug 2005 09:42:19 -0700 > To: <php-general@lists.php.net> > Subject: [PHP] Error #1136 > > 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... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#221290) next »