Formating MySQL
#2

That string is fine, however that query is not. That query will set the Money column of ALL rows in the table, you need to specify who you're setting it for, for example:

pawn Код:
new query[200];
format(query,200,"UPDATE `Test` SET Money = %i WHERE Username = '%s'",GetPlayerMoney(playerid),name[playerid]);
return mysql_query(query);
Obviously you'll need to sort out getting the name of the player yourself, what I gave is only an example if you were storing the name of players in an array.
Reply


Messages In This Thread
Formating MySQL - by Raimis_R - 18.11.2010, 14:25
Re: Formating MySQL - by JaTochNietDan - 18.11.2010, 14:32
Re: Formating MySQL - by Raimis_R - 18.11.2010, 14:33
Re: Formating MySQL - by JaTochNietDan - 18.11.2010, 14:41
Re: Formating MySQL - by Raimis_R - 18.11.2010, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)