MySQL Query Problem
#3

Quote:
Originally Posted by Sorato
Посмотреть сообщение
Hey,

Try that:

Код:
stock SaveAccount(playerid)
{
    new szQuery[2000];
//  PlayerInfo[playerid][pArmour] = GetPlayerArmour(playerid);
//  PlayerInfo[playerid][pHealth] = GetPlayerHealth(playerid);
    PlayerInfo[playerid][pScore] = GetPlayerScore(playerid);
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    PlayerInfo[playerid][pWantedLevel] = GetPlayerWantedLevel(playerid);
    format(szQuery, sizeof(szQuery), "UPDATE `Accounts` SET `Admin Level`='%d', `Donator`='%d', `Cheater`='%d', `Banned`='%d', `Muted`='%d', `TimesRobbed`='%d', `Robbed`='%d', `WantedLevelsGained`='%d',`WantedLevel`='%d',`Kills`='%d',`Deaths`='%d',`Score`='%d', `Cash`='%d', `Armour`='%d', `Health`='%d', `Jailed`='%d', `Prisioned`='%d', `LastOnline`='%d', `TimeOnline`='%d'",
    PlayerInfo[playerid][pAdminLevel],PlayerInfo[playerid][pDonator],PlayerInfo[playerid][pCheater],PlayerInfo[playerid][pBanned],PlayerInfo[playerid][pMuted],PlayerInfo[playerid][pTimesRobbed],PlayerInfo[playerid][pRobbed],PlayerInfo[playerid][pWantedLevelsGained],PlayerInfo[playerid][pWantedLevel],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pScore],
    PlayerInfo[playerid][pCash],PlayerInfo[playerid][pArmour],PlayerInfo[playerid][pHealth],PlayerInfo[playerid][pJailed],PlayerInfo[playerid][pPrisioned],PlayerInfo[playerid][pLastOn],PlayerInfo[playerid][pTimeOnline]);
    mysql_query(szQuery, qDefault);
    return 1;
}

Explain him whats wrong.

Anyways you are missing a " , " here `TimeOnline`='%d'",.
Reply


Messages In This Thread
MySQL Query Problem - by xMichaelx - 06.12.2011, 20:58
AW: MySQL Query Problem - by Sorato - 06.12.2011, 21:03
Respuesta: AW: MySQL Query Problem - by kirk - 06.12.2011, 21:07
Re: MySQL Query Problem - by xMichaelx - 06.12.2011, 21:07
AW: MySQL Query Problem - by Sorato - 06.12.2011, 21:14
Respuesta: AW: MySQL Query Problem - by kirk - 07.12.2011, 16:23

Forum Jump:


Users browsing this thread: 4 Guest(s)