简体   繁体   English

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

[英]Incorrect integer value: '' for column 'ColorHair' at row 1

Hey so am getting this error 嘿,我收到这个错误

Incorrect integer value: '' for column 'ColorHair' at row 1 第1行的'ColorHair'列的整数值不正确:''

Can anybody please help me or give me a fix for this D: 有人可以帮我还是给我解决这个问题:

$sql2 = mysql_query("INSERT INTO users ( Username , Password , Access , ActivationFlag , Age , Gender , Email , Level , Gold , Coins , Exp , ColorHair , ColorSkin , ColorEye , ColorBase , ColorTrim , ColorAccessory , DateCreated , LastLogin , UpgradeExpire , UpgradeDays , BankSlots , HouseSlots , BagSlots , HairID , HairFile , HairName , Permamute , Quests , Quests2 , Settings , Achievement , LastArea , Country , Founder , GuildID , AchievementID , RankID , HouseInfo , Kills , Deaths , GuildRank , CurrentServer , DailyQuest0 , DailyQuest1 , DailyQuest2 , MonthlyQuest0 , Upgraded , XpBoost , CpBoost , GoldBoost ) VALUES ('$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', '00000000000000000000000000000000000000000000000000', '00000000000000000000000000000000000000000000000000', '0', '0', '', 'US', '0', '0', '0', ' $ sql2 = mysql_query(“ INSERT INTO usersUsernamePasswordAccessActivationFlagAgeGenderEmailLevelGoldCoinsExpColorHairColorSkinColorEyeColorBaseColorTrimColorAccessoryDateCreatedLastLoginUpgradeExpireUpgradeDaysBankSlotsHouseSlotsBagSlotsHairIDHairFileHairNamePermamuteQuestsQuests2SettingsAchievementLastAreaCountryFounderGuildIDAchievementIDRankIDHouseInfoKillsDeathsGuildRankCurrentServerDailyQuest0DailyQuest1DailyQuest2MonthlyQuest0UpgradedXpBoostCpBoostGoldBoost )值('$ 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','00000000000000000000000000000000000000000000000000','0 ','0',','US','0','0','0',' 0', '0', '0', '0', '0', 'Offline', '', '', '', '0', '0', '0', '0', '0');") or die("status=Error&strReason=" . 0','0','0','0','0','脱机','','','','0','0','0','0','0 ');“)或die(” status = Error&strReason =“。 mysql_error()); mysql_error());

Your "ColorHair" column is of type integer, and you pass it the value of an empty string : '' 您的“ ColorHair”列的类型为整数,您将空字符串的值传递给它:

If your db field accept null for this field you may consider adding this line of PHP before doing your request : 如果您的db字段对此字段接受null,则可以在执行请求之前考虑添加以下PHP行:

$haircolor = intval($haircolor);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM