|
Posted by Jim Moseby on 08/24/05 21:03
>
> 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
Or, you may be doing:
$sql="INSERT INTO tablename VALUES('$name', '$address', '$city', '$state',
'$zip', '$phone')";
....where your table actually has an auto-increment value in addition to the
6 columns above. This will produce the error too. You will need to specify
the columns in that case, as Stephen correctly stated above.
JM
JM
Navigation:
[Reply to this message]
|