Subtracting all players info in mysql
#1

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
Reply
#2

`Money` = `Money` - 50
Reply
#3

Thank you very very much!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)