morgan1122 Posted December 24, 2010 Posted December 24, 2010 QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',1,'DEFAULT','DEFAULT',1,1,1, '1', 'a:4:{s:4:\"stat\";s:2:\"hp\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:7:\"percent\";s:10:\"inc_amount\";i:100;}', '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) This is the error i got when i tryed to create an item dont know what it is or if its a table in PHPMyAdmin how do i delete it Thanks Quote
Dominion Posted December 24, 2010 Posted December 24, 2010 Well the Column count doesn't match so count how many fields in the “items” table, and adjust the insert to match. Quote
morgan1122 Posted December 24, 2010 Author Posted December 24, 2010 is that by phpmyadmin? and how i do it? Quote
Dominion Posted December 24, 2010 Posted December 24, 2010 The “items” table is in phpmyadmin yes, the insert query is whatever page gave you the error. You do it by counting, take into account things like id that are auto increment etc... Quote
morgan1122 Posted December 24, 2010 Author Posted December 24, 2010 What table needs droped itmid itmtype itmname itmdesc itmbuyprice itmsellprice itmbuyable effect1_on effect1 effect2_on effect2 effect3_on effect3 weapon Quote
morgan1122 Posted December 24, 2010 Author Posted December 24, 2010 There all the tables i have in my items Quote
Dominion Posted December 24, 2010 Posted December 24, 2010 You don’t need to drop anything, count that next to what the insert query is inserting... Also, please avoid double posting. If possible edit your last post with any added info. Quote
Danny696 Posted December 24, 2010 Posted December 24, 2010 shouldnt you have an armour column in that table? Quote
Dominion Posted December 24, 2010 Posted December 24, 2010 shouldnt you have an armour column in that table? Yes it should. ;) Quote
morgan1122 Posted December 24, 2010 Author Posted December 24, 2010 sorry i dont understand i havent got armour power i think i need that were do i find the sql to insert? Quote
Dominion Posted December 24, 2010 Posted December 24, 2010 sorry i dont understand i havent got armour power i think i need that were do i find the sql to insert? Into phpmyadmin on the "sql" tab? I assume you're asking where to put the query that adds armour anyway. Quote
morgan1122 Posted December 25, 2010 Author Posted December 25, 2010 im asking were wo i find my mysql for amour mate because i dont know were i can find it Quote
Uridium Posted December 25, 2010 Posted December 25, 2010 Morgan this is what you phpmyadmin tabke should look like for ITEMS [mysql]CREATE TABLE `items` ( `itmid` int(11) NOT NULL auto_increment, `itmtype` int(11) NOT NULL default '0', `itmname` varchar(255) NOT NULL default '', `itmdesc` text NOT NULL, `itmbuyprice` int(11) NOT NULL default '0', `itmsellprice` int(11) NOT NULL default '0', `itmbuyable` int(11) NOT NULL default '0', `effect1_on` tinyint(4) NOT NULL default '0', `effect1` text NOT NULL, `effect2_on` tinyint(4) NOT NULL default '0', `effect2` text NOT NULL, `effect3_on` tinyint(4) NOT NULL default '0', `effect3` text NOT NULL, `weapon` int(11) NOT NULL default '0', `armor` int(11) NOT NULL default '0', PRIMARY KEY (`itmid`) ) ENGINE=MyISAM ;[/mysql] Quote
morgan1122 Posted December 25, 2010 Author Posted December 25, 2010 Morgan this is what you phpmyadmin tabke should look like for ITEMS [mysql]CREATE TABLE `items` ( `itmid` int(11) NOT NULL auto_increment, `itmtype` int(11) NOT NULL default '0', `itmname` varchar(255) NOT NULL default '', `itmdesc` text NOT NULL, `itmbuyprice` int(11) NOT NULL default '0', `itmsellprice` int(11) NOT NULL default '0', `itmbuyable` int(11) NOT NULL default '0', `effect1_on` tinyint(4) NOT NULL default '0', `effect1` text NOT NULL, `effect2_on` tinyint(4) NOT NULL default '0', `effect2` text NOT NULL, `effect3_on` tinyint(4) NOT NULL default '0', `effect3` text NOT NULL, `weapon` int(11) NOT NULL default '0', `armor` int(11) NOT NULL default '0', PRIMARY KEY (`itmid`) ) ENGINE=MyISAM ;[/mysql] thats what i got below when i tryed adding it mate #1050 - Table 'items' already exists Quote
Dominion Posted December 25, 2010 Posted December 25, 2010 [mysql] alter table items add `armor` int(11) NOT NULL default '0'; [/mysql] If adding the armor back into the table does not work post the insert query that errors. Quote
morgan1122 Posted December 25, 2010 Author Posted December 25, 2010 Thanks alot mate it helped me so much now its all working Quote
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.