SQL query
#6

yeah weird

try it like this just to make sure your query works

pawn Код:
stock SaveStats(playerid)
{
    new pname[24];
    GetPlayerName(playerid,pname,24);
    format(SQL_Query,sizeof(SQL_Query),"UPDATE `Accounts` SET `Money` = '%d', `Level` = '%d', `AdminLevel` = '%d', `Faction` = '%d', `FactionRank` = '%d', `RegistrationStep` = '%d', `BirthDay` = '%d', `BirthMonth` = '%d', `BirthYear` = '%d', `SpawnPoint` = '%d', `TutorialComplete` = '%d' WHERE `Username` = '%s'",
    Player[playerid][Money],
    Player[playerid][Level],
    Player[playerid][AdminLevel],
    Player[playerid][Faction],
    Player[playerid][FactionRank],
    Player[playerid][RegistrationStep],
    Player[playerid][BirthDay],
    Player[playerid][BirthMonth],
    Player[playerid][BirthYear],
    Player[playerid][SpawnPoint],
    pname);
   
    mysql_query(SQL_Query);
    mysql_free_result();
    return 1;
}
could also add a
printf(); to the pName functions and see what it is actually returning.

pawn Код:
pName(playerid)
{
    new pname[24];
    GetPlayerName(playerid,pname,24);
    printf("pName = %s",pname);
    return pname;
}
Reply


Messages In This Thread
SQL query - by iGetty - 23.05.2012, 01:12
Re: SQL query - by Jonny5 - 23.05.2012, 01:35
Re: SQL query - by iGetty - 23.05.2012, 01:42
Re: SQL query - by Jonny5 - 23.05.2012, 01:53
Re: SQL query - by iGetty - 23.05.2012, 02:02
Re: SQL query - by Jonny5 - 23.05.2012, 02:06
Re: SQL query - by Jonny5 - 23.05.2012, 02:08
Re: SQL query - by iGetty - 23.05.2012, 02:12

Forum Jump:


Users browsing this thread: 1 Guest(s)