23.05.2012, 01:12
Hello, the below code does the following on the console
It doesn't do anything in the database and I don't know what's up with it.
Thanks for any help given!
pawn Код:
stock SaveStats(playerid)
{
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(playerid));
mysql_query(SQL_Query);
mysql_free_result();
return 1;
}
Код:
[02:16:53] CMySQLHandler::Query(UPDATE `Accounts` SET `Money` = '0', `Level` = '0', `AdminLevel` = '1', `Faction` = '0', `FactionRank` = '0', `RegistrationStep` = '3', `BirthDay` = '24', `BirthMonth` = '5', `BirthYear` = '1952', `SpawnPoint` = '0', `TutorialComplete` = '74' WHERE `Username` = '') - Successfully executed. [02:16:53] >> mysql_free_result( Connection handle: 1 ) [02:16:53] CMySQLHandler::FreeResult() - The result is already empty.
Thanks for any help given!