02.10.2017, 09:29
Compound operators would not work in SQL.Use pMoney = pMoney - 500
Make your string larger.(200 would be enough)
Don't use quotes (' ') around field values that are not string that just provide extra overhead to parse data.
Also only update things that really need an "update"
Make your string larger.(200 would be enough)
Don't use quotes (' ') around field values that are not string that just provide extra overhead to parse data.
PHP код:
new str[200];
format(str, sizeof(str), "UPDATE `playeraccounts` SET pSpawnPosX=%f, pSpawnPosY=%f, pSpawnPosZ=%f, pSpawnPosFacing=%f, pSpawnSaved=1, pMoney = pMoney - 500 WHERE pID=%d", pPickInfo[i][dXe], pPickInfo[i][dYe], pPickInfo[i][dZe], pPickInfo[i][dAe], PlayerInfo[playerid][pID]);
mysql_query(Connection, str);