嘿,我收到这个错误
第1行的'ColorHair'列的整数值不正确:''
任何人都可以帮助我或为我解决此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
)值('$ 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);