Subtracting all players info in mysql - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Subtracting all players info in mysql (
/showthread.php?tid=292581)
Subtracting all players info in mysql -
0x80808000 - 24.10.2011
Hey i need help with subtracting info in MySQL.
The idea its i want to run 1 query and update all statistic.
pawn Код:
mysql_query("UPDATE `table` SET `Money` = '50' WHERE `ID` = '50'");
Ok its fine but i want subtract info like
new Stats = 50;
Stats -= 15;
new value its 35.
So how can i run 1 query and subtract all players info, just like
pawn Код:
mysql_query("UPDATE `table` SET `Money` -= '50' WHERE `ID` = '50'");
But its give syntax error.
I think sql "masters" can help me
Re: Subtracting all players info in mysql -
Jefff - 24.10.2011
`Money` = `Money` - 50
Re: Subtracting all players info in mysql -
0x80808000 - 24.10.2011
Thank you very very much!