[HELP] MYSQL Not save data
#8

Quote:
Originally Posted by SyS
Посмотреть сообщение
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.

PHP код:
new str[200];
format(strsizeof(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(Connectionstr); 
Also only update things that really need an "update"
Thank a lot
Reply


Messages In This Thread
[HELP] MYSQL Not save data - by MasterCodez - 01.10.2017, 17:42
Re: [HELP] MYSQL Not save data - by m4karow - 01.10.2017, 17:45
Re: [HELP] MYSQL Not save data - by whadez - 01.10.2017, 17:54
Re: [HELP] MYSQL Not save data - by 10MIN - 01.10.2017, 18:07
Re: [HELP] MYSQL Not save data - by MasterCodez - 02.10.2017, 03:47
Re: [HELP] MYSQL Not save data - by biker122 - 02.10.2017, 08:32
Re: [HELP] MYSQL Not save data - by SyS - 02.10.2017, 09:29
Re: [HELP] MYSQL Not save data - by MasterCodez - 02.10.2017, 10:50

Forum Jump:


Users browsing this thread: 4 Guest(s)