2014-02-28 53 views
0

嘿所以我得到這個錯誤不正確的整數值:「」列「ColorHair」在行1

不正確的整數值:「在排列「ColorHair」 1

任何人可以幫我或者給我定爲這d:

$ SQL2 =請求mysql_query(「INSERT INTO usersUsernamePasswordAccessActivationFlagAgeGenderEmailLevelGoldCoinsExpColorHairColorSkinColorEyeColorBaseColorTrimColorAccessoryDateCreatedLastLoginUpgradeExpireUpgradeDaysBankSlotsHouseSlotsBagSlotsHairIDHairFileHairNamePermamuteQuestsQuests2SettingsAchievementLastArea, Country,Founder,GuildID,AchievementID,RankID,HouseInfo, Kills,DeathsGuildRankCurrentServerDailyQuest0DailyQuest1DailyQuest2MonthlyQuest0UpgradedXpBoostCpBoostGoldBoost)VALUES( '$用戶名', '$ PASS1', '1', '5', '15', '$性別' ,'$ email','1','0','0','0','$ haircolor','$ skincolor','$ eyecolor','0','0','0',' $ time','$ time','$ time','-1','0','10','40','$ hairid','$ hairfile','$ hairname','0', '0000000000000000000000000000000000000000000000','00000000000000000000000000000000000000000000000000','0','0','','US','0','0','0','0','0','0','0' ,'0','離線','','','','0','0','0','0','0');「)或死(」狀態=錯誤& strReason =「。 mysql_error());

+3

''$ haircolor''是一個空字符串,這意味着$染髮東西在字符串上下文中使用時,計算結果爲空字符串。 –

回答

1

你「ColorHair」列是整數類型,你傳遞一個空字符串值:「」

如果你的數據庫字段接受空這個領域,你可能會考慮加入這一行的PHP之前做你的要求:

$haircolor = intval($haircolor); 
相關問題