mysql_format(mysql, query, sizeof(query), "UPDATE `accs` SET `pName` = %e, `pSecKey` = %d, `pLevel` = %d, `pRespect` = %d, `pSkin` = %d, `pIP` = %e, `pAdmin` = %d, `pVIP` = %d, `pMoney` = %d, `pGender` = %d, `pAge` = %d, `pBank` = %d, `pBanned` = %d, `pBans` = %d, `pBannedBy` = %e, `pBanReason` = %e, `pBanDate` = %e, `pBanTime` = %e, `pBanAppealable` = %d, `pFaction` = %d, `pRank` = %d, `pFacSkin` = %d, `pTester` = %d, `pTutStep` = %d, `pFinishedTut` = %d, `pMuted` = %d, `pPosX` = %f, `pPosY` = %f, `pPosZ` = %f, `pPosA` = %f WHERE `pID` = %d"
[05:13:41] [part] Jason_Vienna has left the server (0:1) [05:13:41] [SQL-ERR][] EID:1064 >>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.255.255, `pAdmin` = 0, `pVIP` = 0, `pMoney` = 0, `pGender` = 0, `pAge` = 0, `pB' at line 1 [05:13:41] UPDATE `accs` SET `pName` = Test_Account, `pSecKey` = 0, `pLevel` = 0, `pRespect` = 0, `pSkin` = 0, `pIP` = 255.255.255.255, `pAdmin` = 0, `pVIP` = 0, `pMoney` = 0, `pGender` = 0, `pAge` = 0, `pBank` = 0, `pBanned` = 0, `pBans` = 0, `pBannedBy` = , `pBanReason` = , `pBanDate` = , `pBanTime` = , `pBanAppealable` = 0, `pFaction` = 0, `pRank` = 0, `pFacSkin` = 0, `pTester` = 0, `pTutStep` = 0, `pFinishedTut` = 0, `pMuted` = 1125808864, `pPosX` = -80.625, `pPosY` = 1.578, `pPosZ` = 132.06, `pPosA` = 7.006e-45 WHERE `pID` =
[05:13:41] UPDATE `accs` SET `pName` = Test_Account, `pSecKey` = 0, `pLevel` = 0, `pRespect` = 0, `pSkin` = 0, `pIP` = 255.255.255.255, `pAdmin` = 0, `pVIP` = 0, `pMoney` = 0, `pGender` = 0, `pAge` = 0, `pBank` = 0, `pBanned` = 0, `pBans` = 0, `pBannedBy` = , `pBanReason` = , `pBanDate` = , `pBanTime` = , `pBanAppealable` = 0, `pFaction` = 0, `pRank` = 0, `pFacSkin` = 0, `pTester` = 0, `pTutStep` = 0, `pFinishedTut` = 0, `pMuted` = 1125808864, `pPosX` = -80.625, `pPosY` = 1.578, `pPosZ` = 132.06, `pPosA` = 7.006e-45 WHERE `pID` =
mysql_format(mysql, query, sizeof(query), "UPDATE `accs` SET `pName` = '%s', `pSecKey` = %d, `pLevel` = %d, `pRespect` = %d, `pSkin` = %d, `pIP` = '%s', `pAdmin` = %d, `pVIP` = %d, `pMoney` = %d, `pGender` = %d, `pAge` = %d, `pBank` = %d, `pBanned` = %d, `pBans` = %d, `pBannedBy` = '%s', `pBanReason` = '%s', `pBanDate` = '%s', `pBanTime` = '%s', `pBanAppealable` = %d, `pFaction` = %d, `pRank` = %d, `pFacSkin` = %d, `pTester` = %d, `pTutStep` = %d, `pFinishedTut` = %d, `pMuted` = %d, `pPosX` = %f, `pPosY` = %f, `pPosZ` = %f, `pPosA` = %f WHERE `pID` = %d"
The IP, trying that out, but mister prokill I'm not using %s instead of %e.
|
You realize, You're passing a STRING.
There for using %e is redundant.. You may as well pass the STRING to the VARCHAR as your table = VARCHAR.. Next time don't ask for help if you don't like the answer given. I've just created a dummy table an run my syntax , It works.. So, Why are you using %e making a redundant statement. |
Realistically, you don't need to escape IP addresses, but it won't really make a difference.
Using %e shouldn't make a difference since %e is only escaping the string. |
Yea, You're ESCAPING the string, So if the string is greater than the given value in his script it sends an empty or w.e many digits the script is allowing.
Whilst if he is sending string, The sizeof is already defined in the script anyway.. |
Код:
[05:13:41] UPDATE `accs` SET `pName` = Test_Account, `pSecKey` = 0, `pLevel` = 0, `pRespect` = 0, `pSkin` = 0, `pIP` = 255.255.255.255, `pAdmin` = 0, `pVIP` = 0, `pMoney` = 0, `pGender` = 0, `pAge` = 0, `pBank` = 0, `pBanned` = 0, `pBans` = 0, `pBannedBy` = , `pBanReason` = , `pBanDate` = , `pBanTime` = , `pBanAppealable` = 0, `pFaction` = 0, `pRank` = 0, `pFacSkin` = 0, `pTester` = 0, `pTutStep` = 0, `pFinishedTut` = 0, `pMuted` = 1125808864, `pPosX` = -80.625, `pPosY` = 1.578, `pPosZ` = 132.06, `pPosA` = 7.006e-45 WHERE `pID` = Also, it doesn't look like you're passing anything for pID? Is the integer for pID being defined and passed or is it just being cut off? Your string might not be big enough for the query if so. |
pData[playerid][pID] = cache_get_field_content_int(0, "pID");