12.03.2013, 13:41
I have two mysql errors and I can't find the mistake in it.
Saving
Код:
Error (0): Failed to exeute query. Column count doesn't match value count at row 1. Error (0): Failed to exeute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''15.48225' at line 1.
pawn Код:
stock SavePlayer(playerid)
{
new query[126], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerPos(playerid, PlayerS[playerid][Position][0], PlayerS[playerid][Position][1], PlayerS[playerid][Position][2]);
format(query, sizeof(query), "UPDATE accounts SET Name = '%s', Password = '%s', PlayerX = '%f', PlayerY = '%f', PlayerZ = '%f' WHERE Name = '%s'", pName, PlayerS[playerid][Password], PlayerS[playerid][Position][0], PlayerS[playerid][Position][1], PlayerS[playerid][Position][2], pName);
mysql_query(query);
}