rhijaen Posted October 28, 2008 Share Posted October 28, 2008 INSERT INTO items (IDString,IDNumber,Name,SkinID,ShopType,EquipPosition,req_Strength_req_Endurance,req_Agility,req_Wisdom,req_Intelligence,req_Attack,DamageFormula,Exhaust,ArmorClass,Dodge,b_int,b_end,b_str,b_wis,b_agi,b_luck,b_attack,b_dodge,b_damage,b_radiance,b_r_air,b_r_fire,b_r_water,b_r_earth,b_r_light,b_r_dark,b_p_air,b_p_water,b_p_water,b_p_fire,b_p_earth,b_p_light,b_p_dark,b_StunBlow,b_PowerfulBlow,b_FirstAid,bParry,b_Meditate,b_Hide,b_Rob,b_Sneak,b_Search,b_PickLock,b_ArmorPenetration,b_Peek,b_RapidHealing,b_Archery,Radius,Charges,JunkAtRemort,CannotHide,CannotEquip,CannotJunk,CannotRob,CannotDrop,IsUnique,CanBeSummoned,IsRangedWeapon,Unlimited,Location,ReSell,Weight) VALUES ('Steel Chest',41884,'Steel Chest',262,'armor',,'armor','body',0,0,0,0,0,0,,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,'Nowhere',0,0) When trying to insert this into my table with phpmyadmin, I get: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''armor','body',0,0,0,0,0,0,,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0' at line 2 What am I doing wrong? version 5.0.67-community mysql> SHOW CREATE TABLE items\G *************************** 1. row *************************** Table: items Create Table: CREATE TABLE `items` ( `IDString` varchar(50) NOT NULL, `IDNumber` int(5) NOT NULL, `Name` varchar(50) NOT NULL, `SkinID` int(3) default NULL, `ShopType` varchar(20) default NULL, `ItemType` varchar(20) default NULL, `EquipPosition` enum('body','feet','hands','head','legs','finger','wrist','nec k','right-handed','left-handed','two-handed','waist','back','none') default NULL , `req_Strength` int(5) default NULL, `req_Endurance` int(5) default NULL, `req_Agility` int(5) default NULL, `req_Wisdom` int(5) default NULL, `req_Intelligence` int(5) default NULL, `req_Attack` int(5) default NULL, `DamageFormula` varchar(100) default NULL, `Exhaust` varchar(100) default NULL, `ArmorClass` decimal(3,3) default NULL, `Dodge` int(5) default NULL, `b_int` varchar(50) default NULL, `b_end` varchar(50) default NULL, `b_str` varchar(50) default NULL, `b_wis` varchar(50) default NULL, `b_agi` varchar(50) default NULL, `b_luck` varchar(50) default NULL, `b_attack` varchar(50) default NULL, `b_dodge` varchar(50) default NULL, `b_damage` varchar(50) default NULL, `b_radiance` varchar(50) default NULL, `b_r_air` varchar(50) default NULL, `b_r_fire` varchar(50) default NULL, `b_r_water` varchar(50) default NULL, `b_r_earth` varchar(50) default NULL, `b_r_light` varchar(50) default NULL, `b_r_dark` varchar(50) default NULL, `b_p_air` varchar(50) default NULL, `b_p_water` varchar(50) default NULL, `b_p_fire` varchar(50) default NULL, `b_p_earth` varchar(50) default NULL, `b_p_light` varchar(50) default NULL, `b_p_dark` varchar(50) default NULL, `b_StunBlow` varchar(50) default NULL, `b_PowerfulBlow` varchar(50) default NULL, `b_FirstAid` varchar(50) default NULL, `b_Parry` varchar(50) default NULL, `b_Meditate` varchar(50) default NULL, `b_Hide` varchar(50) default NULL, `b_Rob` varchar(50) default NULL, `b_Sneak` varchar(50) default NULL, `b_Search` varchar(50) default NULL, `b_PickLock` varchar(50) default NULL, `b_ArmorPenetration` varchar(50) default NULL, `b_Peek` varchar(50) default NULL, `b_RapidHealing` varchar(50) default NULL, `b_Archery` varchar(50) default NULL, `Radius` int(2) default NULL, `Charges` int(5) default NULL, `JunkAtRemort` tinyint(1) default NULL, `CannotHide` tinyint(1) default NULL, `CannotEquip` tinyint(1) default NULL, `CannotJunk` tinyint(1) default NULL, `CannotRob` tinyint(1) default NULL, `CannotDrop` tinyint(1) default NULL, `IsUnique` tinyint(1) default NULL, `CanBeSummoned` tinyint(1) default NULL, `IsRangedWeapon` tinyint(1) default NULL, `Unlimited` tinyint(1) default NULL, `Location` varchar(50) default NULL, `ReSell` int(9) default NULL, `Weight` int(2) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Quote Link to comment https://forums.phpfreaks.com/topic/130503-solved-simple-insert-into-help/ Share on other sites More sharing options...
xtopolis Posted October 28, 2008 Share Posted October 28, 2008 I'm fairly certain you need to use single quotes for null values rather than just skipping them like ,,, ,,, -> '','','','' Quote Link to comment https://forums.phpfreaks.com/topic/130503-solved-simple-insert-into-help/#findComment-677017 Share on other sites More sharing options...
rhijaen Posted October 28, 2008 Author Share Posted October 28, 2008 Thanks..so many values confused me.. All sorted Quote Link to comment https://forums.phpfreaks.com/topic/130503-solved-simple-insert-into-help/#findComment-677024 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.