FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


MySql error: Column count doesn't match value count at row 1





riv_
I'm trying to call a row from my db, and I'm getting a mysql error message... says "Column count doesn't match value count at row 1" Crying or Very sad
I can't imagine what that means.: Embarassed
Can someone please help?
Thanks very much.
Cool
BlackSkad
Maybe you can give us the sql-statement and a scheme form your table. With only the error, we can't really help you.
martindecorte
This error usually occurs when you're trying to insert an incomplete row, when it's not allowed.
For example, your table has 5 columns, and you're trying to insert a row with only 4 values, and the missing value can't be NULL (the value that is automatically inserted in case you omitted it).

So, if this is the case, either complete the row you want to insert, or modify your DB scheme by removing the NOT NULL attribute of the missing column.

Now, you told you were tring to "call a row", does that mean you aren't inserting a row (like I supposed), but reading it ?
riv_
No, I'm not inserting a whole row. I'm inserting a row, but there are more fields in the db than I'm entering now; the undefined fields have a default value in the database.
I've done this before, I don't understand what the problem is...
riv_
Well, as always, it was something STUPID! Embarassed
I lost track of fields in my array... I told it to enter more fields than I had defined!
And it came up with an error... no kidding!
Thanks for being patient guys.
The good news is... I finally got a LONG bunch of scripts done, and they all work when I put them together now! (my very first USEFUL construction)
Thank you all for helping me through it!
Related topics
How To : Improve Your PHP Programming
MySQL statement error (got me going)
Mysql error!
An Example to mySQL class
MySQL error 1604
[solved] Weird mysql error
Suppressing mysql error
[mySQL] Error I cannot Debug
Mysql Error
MySQL error
Mysql error: Warning: mysql_num_rows():
MySQL error
Prevent mysql error showing when code needs user input
Change password and forgot password script
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.