2013-08-16 3 views
-6

무기를 서버에 삽입하려고합니다. 그러나 "열 개수가 행 1의 값 개수와 일치하지 않습니다."라는 메시지가 표시 될 때마다 실행하려고합니다.어떻게 수정합니까? 열 개수가 SQL의 1 행에서 값 개수와 일치하지 않습니까?

나는 모든 것을 살펴 봤는데 모든 것이 잘된 것처럼 보입니다. 너희들이 날 도와 줄 수있어?

INSERT INTO item_template (entry, class, subclass, unk0, name, displayid, Quality, Flags, BuyCount, BuyPrice, SellPrice, InventoryType, AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, maxcount, stackable, ContainerSlots, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, dmg_min1, dmg_max1, dmg_type1, dmg_min2, dmg_max2, dmg_type2, armor, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, ammo_type, RangedModRange, spellid_1, spelltrigger_1, spellcharges_1, spellcooldown_1, spellcategory_1, spellcategorycooldown_1, spellid_2, spelltrigger_2, spellcharges_2, spellcooldown_2, spellcategory_2, spellcategorycooldown_2, spellid_3, spelltrigger_3, spellcharges_3, spellcooldown_3, spellcategory_3, spellcategorycooldown_3, spellid_4, spelltrigger_4, spellcharges_4, spellcooldown_4, spellcategory_4, spellcategorycooldown_4, spellid_5, spelltrigger_5, spellcharges_5, spellcooldown_5, spellcategory_5, spellcategorycooldown_5, bonding, description, PageText, LanguageID, PageMaterial, startquest, lockid, Material, sheath, RandomProperty, RandomSuffix, block, itemset, MaxDurability, area, Map, BagFamily, TotemCategory, socketColor_1, socketContent_1, socketColor_2, socketContent_2, socketColor_3, socketContent_3, socketBonus, GemProperties, RequiredDisenchantSkill, ArmorDamageModifier, ScriptName, DisenchantID, StatsCount) 
VALUES (12345, 2, 8, -1, "Million Souls", 71781, 5, 0, 1, 20000, 900000000, 17, -1, -1, 900, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 98000, 3, 99890, 7, 99999, 4, 99999, 6, 99999, 38, 99999, 42, 99999, 0, 0, 0, 0, 0, 0, 99999998, 99999998, 0, 9999999, 9999999, 2, 900, 999999, 99999, 999999, 99999, 999999, 99999, 98.2, 0, 0, 17713, 1, 0, 0, 0, 0, 18060, 1, 0, 0, 0, 0, 18060, 1, 0, 0, 0, 0, 35844, 1, 0, 0, 0, 0, 35844, 1, 0, 0, 0, 0, 2, "Death", 0, 0, 0, 0, 0, 1, 1, 0, 0, 900, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'internalitemhanler', 0, 10); 

필자는 불필요한 모든 빈 열을 삭제했지만 여전히 동일한 오류 메시지가 표시됩니다.

INSERT INTO item_template (entry, class, subclass, unk0, name, displayid, Quality, Flags, BuyCount, BuyPrice, SellPrice, InventoryType, AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, maxcount, stackable, ContainerSlots, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8) 
VALUES (12345, 2, 8, -1, "Million Souls", 71781, 5, 0, 1, 20000, 900000000, 17, -1, -1, 900, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 98000, 3, 99890, 7, 99999, 4, 99999, 6, 99999, 38, 99999, 42, 99999, 0, 0, 0, 0, 0, 0, 99999998, 99999998, 0, 9999999, 9999999, 2, 900, 999999, 99999, 999999, 99999, 999999, 99999, 98.2, 0, 0, 17713, 1, 0, 0, 0, 0, 18060, 1, 0, 0, 0, 0, 18060, 1, 0, 0, 0, 0, 35844, 1, 0, 0, 0, 0, 35844, 1, 0, 0, 0, 0, 2, "Death", 0, 0, 0, 0, 0, 1, 1, 0, 0, 900, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'internalitemhanler', 0, 10); 
+3

1 백만 개의 열과 약 110 만 개의 값이있는 것 같습니다.이 숫자는 일치해야합니다. –

+1

이것은 검색어 텍스트입니까? – Hogan

+1

정규화가 필요합니다. – Elias

답변

0

첫 번째와 두 번째 괄호의 요소를 계산하면 실제로 개수가 달라집니다. 나는이로 실행하면

, 나는 빨리 범인을 공개 할

INSERT INTO item_template SET 
    entry=12345, 
    class=2, 
    subclass=8, 
    ... 

에 쿼리를 다시 작성하십시오.

+1

그건 재밌 네요. 나는 그들을 세었고, 둘 다 123을 얻었습니다. 문자열 상수에'''를 사용했을 수도 있습니까? – Hogan

+0

"MySql의 문자열 상수는 괜찮습니다. SQL Server는 또 다른 이야기가 될 것입니다. –

관련 문제