嘿所以得到这个错误
错误的整数值:''对于第1行的'ColorHair'列
任何人都可以帮助我或者为我解决这个问题:
$ sql2 = mysql_query(“INSERT INTO
users
(Username
,Password
,Access
,ActivationFlag
,Age
,{{1 }},Gender
,Level
,Gold
,Coins
,Exp
,ColorHair
,ColorSkin
,ColorEye
,ColorBase
,ColorTrim
,ColorAccessory
,DateCreated
,LastLogin
,UpgradeExpire
,UpgradeDays
,{ {1}},BankSlots
,HouseSlots
,BagSlots
,HairID
,HairFile
,HairName
,Permamute
,{{1 }},Quests
,Quests2
,Settings
,Achievement
,LastArea
,Country
,Founder
,GuildID
,AchievementID
,RankID
,HouseInfo
,Kills
,Deaths
,GuildRank
,CurrentServer
,DailyQuest0
,{ {1}},DailyQuest1
,DailyQuest2
,MonthlyQuest0
)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','0','0','0','0 ','0','离线','','','','0','0','0','0','0');“)或死亡(”status = Error& strReason =“。mysql_error());
答案 0 :(得分:1)
你的“ColorHair”列是整数类型,你传递一个空字符串的值:''
如果您的db字段对此字段接受null,您可以考虑在执行请求之前添加此行PHP:
$haircolor = intval($haircolor);