thedestroyer Posted October 28, 2009 Share Posted October 28, 2009 Hi everyone when i go to create a new item i get this error can someone help me fix it please? QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',2,'test','test',10,10,0, '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', 0, 0, 'test') Quote Link to comment Share on other sites More sharing options...
Danny696 Posted October 28, 2009 Share Posted October 28, 2009 Typical. check that the ammount of rows going in the table is the same as the table, and make sure everything when making the item has a 0 or something in it Quote Link to comment Share on other sites More sharing options...
thedestroyer Posted October 28, 2009 Author Share Posted October 28, 2009 hi add em on msn pls i dont know much yet so will be easier to help me [email protected] thanks Quote Link to comment Share on other sites More sharing options...
thedestroyer Posted October 28, 2009 Author Share Posted October 28, 2009 help Need someone to explain in more detail please Quote Link to comment Share on other sites More sharing options...
Uriah Posted October 29, 2009 Share Posted October 29, 2009 Column count doesn't match value count means you are trying to put in a different amount of information than you have space for. i.e. look at your "items" data base in your phpmysql in your c panel and look at how many fields are there, eg, itmid, itemprice, itemname etc and if there are say 5 fields, you then look at the line of code where it says INSERT INTO items VALUES... and check how many sets of ' ' are in that line of code, eg, INSERT INTO items VALUES('',200,'gun',etc... this would mean the ('', would be the itmid, the '200', would be the itemprice, and the 'gun', would be the item name) so if the number of fields matches the number of values then there will be no error message. If you are getting the error message you got then the fields and values don't match up so either delete or add a field or value as needed to make them match. If you need more explanation come see me at my site or look me up on yahoo. My profile will give you any details you need. ;) Quote Link to comment Share on other sites More sharing options...
thedestroyer Posted October 29, 2009 Author Share Posted October 29, 2009 thanks done it now thanks! I got like 2 other errors i wil add ya yahoo if thats ok Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.