how to make that
#1

Hey all.
i wanna some help.
i wanna make something in mysql
example :
if in bank withdraw dialog the player have 200 in his bank account , he want withdraw 100, so the 100 will be deducted from the mysql table.
hwo to make that ? plz
Reply
#2

Deduct 100 from the current value. This is easy as an SQL statement:
pawn Код:
UPDATE players SET bank_cash = bank_cash - 100 WHERE UserID = %d
Reply
#3

Oh thx abagail.
You helped me alot.
Thank you
Reply
#4

A possible better query would be (In other cases)
PHP код:
mysql_format(connectionHandlequerysizeof query"UPDATE players SET bank_cash = bank_cash - %i WHERE UserID = %i"withdrawnyourUserVariable); 
I hope you got my tip :P
Reply
#5

Quote:
Originally Posted by saffierr
Посмотреть сообщение
A possible better query would be (In other cases)
PHP код:
mysql_format(connectionHandlequerysizeof query"UPDATE players SET bank_cash = bank_cash - %i WHERE UserID = %i"withdrawnyourUserVariable); 
I hope you got my tip :P
Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)