|
Posted by Stephen Johnson on 08/24/05 19:57
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
>
Navigation:
[Reply to this message]
|