Page 1 of 1
Error: Column count doesn't match value count
Posted: Sun Sep 29, 2002 7:25 pm
by brcolow
Hi, in my php/mysql script i get this error...
Column count doesn't match value count at row 1
Waht does that mean and hiow can i fix it?
Posted: Sun Sep 29, 2002 7:39 pm
by phice
Could you please post the syntax in which your mysql query is asking the database? And, possibly, the layout of the database.
Posted: Sun Sep 29, 2002 7:54 pm
by volka
probably you're trying to add more values than the table has fields.
i.e.
Code: Select all
TABLE `entries` (
`id` tinyint(3),
`tag` varchar(10),
`name` varchar(20)
)
and $query = "INSERT INTO entries VALUES(1,'2','3','4')";
Posted: Tue Oct 01, 2002 4:26 am
by mikeq
...and if you only want to insert into certain columns rather than all columns in your table then
$Query = "INSERT INTO entries (tag,name) values ('2','3')";