Jump to content
MakeWebGames

Creating new item problem


thedestroyer

Recommended Posts

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')

Link to comment
Share on other sites

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. ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...