[ERROR] Mysql Can't save data player
#6

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
Код:
"You have an error in your SQL syntax"
This is why I posted this

-EDIT-

Thats the correct code I think

Код:
			format(query, sizeof(query), "UPDATE `zmusers` SET `pEXP` = `%d`, `pKills` = `%d`, `pDeaths` = `%d`, `pRank` = `%d`, `pEvac` = `%d`, `pAdminLevel` = `%d`",
			pInfo[playerid][pEXP], pInfo[playerid][pKills], pInfo[playerid][pDeaths], pInfo[playerid][pRank], pInfo[playerid][pEvac], pInfo[playerid][pAdminLevel]);
I've combine with mysql_format, and add WHERE `Username` = '%e`
but no result
pawn Код:
stock SaveStats(playerid)
{
    new IP[16];
    GetPlayerIp(playerid, IP, sizeof(IP));
    new query[512];
    mysql_format(mysql, query, sizeof(query), "UPDATE `zmusers` SET `pEXP` = %d `pKills` = %d `pDeaths` = %d `pRank` = %d `pEvac` = %d `pAdminLevel` = %d `pAdminMapping` = %d `pDonateLevel` = %d `pZmc` = %d `pMapsPlayed` = %d `pMoney` = %d `pIP` = `%s` `pBanned` = %d `gLeader` = %d `gMember` = %d `pWarnings` = %d WHERE `Username` = '%e'",
    pInfo[playerid][pEXP], pInfo[playerid][pKills], pInfo[playerid][pDeaths], pInfo[playerid][pRank], pInfo[playerid][pEvac], pInfo[playerid][pAdminLevel], pInfo[playerid][pAdminMapping], pInfo[playerid][pDonateLevel],  pInfo[playerid][pZmc], pInfo[playerid][pMapsPlayed], pInfo[playerid][pMoney], IP, pInfo[playerid][pBanned],  pInfo[playerid][gLeader], pInfo[playerid][gMember], pInfo[playerid][pWarnings], PlayerName(playerid));
    mysql_tquery(mysql, query);
    return 1;
}
Reply


Messages In This Thread
[ERROR] Mysql Can't save data player - by kloning1 - 25.06.2015, 17:00
Re: [ERROR] Mysql Can't save data player - by SecretBoss - 25.06.2015, 17:04
Re: [ERROR] Mysql Can't save data player - by kloning1 - 25.06.2015, 17:05
Re: [ERROR] Mysql Can't save data player - by SecretBoss - 25.06.2015, 17:06
Re: [ERROR] Mysql Can't save data player - by Vince - 25.06.2015, 17:25
Re: [ERROR] Mysql Can't save data player - by kloning1 - 25.06.2015, 17:46
Re: [ERROR] Mysql Can't save data player - by kloning1 - 25.06.2015, 19:07

Forum Jump:


Users browsing this thread: 3 Guest(s)