MySQL help
#3

pawn Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `Accounts` SET `Score` = '%d', `Cash` = '%d', `Level` = '%d', `Kills` = '%d', `Deaths` = '%d', `pMute` = '%d', `Warns` = '%d'  WHERE `Name` = '%s'",\
  score,  money,  PlayerInfo[playerid][Level],  PlayerInfo[playerid][Kills],  PlayerInfo[playerid][Deaths],  PlayerInfo[playerid][muted],  PlayerInfo[playerid][Warns],  GetName(playerid));
  mysql_tquery(mysql, query, "", "");
Here this code would work.
Your code had a syntax error. The symbol ` is used for signifying names of fields, the values that are to be stored in or are to be get from a field should be in this ' symbol.

For example i meed to get a players name from a field i will write `Name` = '%s' and not 'Name' = `%s`.
I hope you understood it.
Reply


Messages In This Thread
MySQL help - by Vaishnav - 20.05.2014, 15:44
Re: MySQL help - by LemonPunch - 20.05.2014, 18:34
Re: MySQL help - by iReacheR - 20.05.2014, 19:04
Re: MySQL help - by Vaishnav - 21.05.2014, 00:10

Forum Jump:


Users browsing this thread: 1 Guest(s)