嘿,我收到这个错误

第1行的'ColorHair'列的整数值不正确:''

任何人都可以帮助我或为我解决此D:


  $ sql2 = mysql_query(“ INSERT INTO usersUsernamePasswordAccessActivationFlagAgeGenderEmailLevelGold,,CoinsExpColorHairColorSkinColorEyeColorBaseColorTrimColorAccessoryDateCreatedLastLoginUpgradeExpireUpgradeDaysBankSlotsHouseSlotsBagSlotsHairIDHairFileHairNamePermamuteQuestsQuests2SettingsAchievementLastArea,,CountryFounderGuildIDAchievementIDRankIDHouseInfoKillsDeathsGuildRankCurrentServerDailyQuest0DailyQuest1DailyQuest2MonthlyQuest0UpgradedXpBoost)值('$ username','$ pass1','1','5','15','$ gender','$ email', '1','0','0','0','$ haircolor','$ skincolor','$ eyecolor','0','0','0','$ time','$ time','$ time','-1','0','10','40','$ hairid','$ hairfile','$ hairname','0','00000000000000000000000000000000000000000000000000000000000000','00000000000000000000000000000000000000000000000000000000 ','0','0',','US','0','0','0','0','0','0','0','0','离线”,“,”,“,”,“ 0”,“ 0”,“ 0”,“ 0”,“ 0”);”)或die(“ status = Error&strReason =”。mysql_error());

最佳答案

您的“ ColorHair”列的类型为整数,您将空字符串的值传递给它:

如果您的db字段对此字段接受null,则可以在执行请求之前考虑添加以下PHP行:

$haircolor = intval($haircolor);

10-06 12:15