Saving a Statistic to a MySQL Field
#1

Hey guys. I have currently done myself a MySQL Login and Register script.
The only thing is. I need a command to send a query to the database to save the amount of cash the player has.
Such as.
INSERT (cash) INTO money WHERE username=(username)

Something like that guys, but the users get to do it via command. Cheers.
Reply
#2

Quote:
Originally Posted by darkrider366
Hey guys. I have currently done myself a MySQL Login and Register script.
The only thing is. I need a command to send a query to the database to save the amount of cash the player has.
Such as.
INSERT (cash) INTO money WHERE username=(username)

Something like that guys, but the users get to do it via command. Cheers.
Add a cash column to your users table then use
Код:
UPDATE users SET cash=(cash) WHERE username=(username)
Reply
#3

wow tyyy

Would this work? ~
Код:
mysql_query("UPDATE users SET cash=%d WHERE username=%d", GetPlayerMoney, GetPlayerName);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)