My values aren't saving into SQL
#2

WHERE ID = %d" you have no reference to your id, I'm not sure how your system indexes users but I'm thinking it should look something like this

pawn Код:
stock savePlayer(playerid) {
    new
        szQuery[512]; // This is the only 512 strign exception, for our queries if we lower it... Then that won't be good...
    format(szQuery, sizeof(szQuery), "UPDATE `players` SET `Money` = '%d', `Score` = '%d', `Admin` = '%d', `Kills` = '%d', `Deaths` = '%d', `Weather` = '%d'", GetPlayerMoney(playerid), GetPlayerScore(playerid), PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pWeather]);
    format(szQuery, sizeof(szQuery), "%s, `Skin` = '%d', `Time` = '%d', `Color` = '%d', `Tele` = '%d', `Message` = '%d' WHERE `PlayerName` = '%s'", szQuery, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pTime], PlayerInfo[playerid][pColor], PlayerInfo[playerid][pColor], PlayerInfo[playerid][pTele], PlayerInfo[playerid][pMessage], ReturnName(playerid));

    mysql_query(szQuery, THREAD_NO_RESULT, playerid, iConnectionHandle);
    return 1;
}
That is to the best of my knowledge I've only used SQLITE but it should be something like that I gather.
Reply


Messages In This Thread
My values aren't saving into SQL - by KiNG3 - 17.04.2013, 05:32
Re: My values aren't saving into SQL - by Pottus - 17.04.2013, 05:41
Re: My values aren't saving into SQL - by KiNG3 - 17.04.2013, 05:53
Re: My values aren't saving into SQL - by Pottus - 17.04.2013, 05:57
Re: My values aren't saving into SQL - by KiNG3 - 17.04.2013, 06:01
Re: My values aren't saving into SQL - by RedCrossER - 17.04.2013, 07:19
Re: My values aren't saving into SQL - by KiNG3 - 17.04.2013, 07:24
Re: My values aren't saving into SQL - by Pottus - 17.04.2013, 07:27
Re: My values aren't saving into SQL - by KiNG3 - 17.04.2013, 07:29
Re: My values aren't saving into SQL - by Pottus - 17.04.2013, 07:32

Forum Jump:


Users browsing this thread: 2 Guest(s)