alex600
Умник
[12:28:59] [ERROR] CMySQLQuery::Execute[] - (error #1064) 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 'WHERE `gOwner` = 'test' LIMIT 1' at line 1
PHP:
publics SaveGarage(i)
{
new scr[128];
new string[1100];
new g = GetPVarInt(i, "PlayerGarage");
format(string, sizeof(string),"UPDATE `garage` SET");
format(scr, sizeof(scr), "`gID` = %d,", Garage[g][gID]);
strcat(string, scr);
format(scr, sizeof(scr), "`gEntrx` = %f,", Garage[g][gEntrx]);
strcat(string, scr);
format(scr, sizeof(scr), "`gEntry` = %f,", Garage[g][gEntry]);
strcat(string, scr);
format(scr, sizeof(scr), "`gEntrz` = %f,", Garage[g][gEntrz]);
strcat(string, scr);
format(scr, sizeof(scr), "`gExitx` = %f,", Garage[g][gExitx]);
strcat(string, scr);
format(scr, sizeof(scr), "`gExity` = %f,", Garage[g][gExity]);
strcat(string, scr);
format(scr, sizeof(scr), "`gExitz` = %f,", Garage[g][gExitz]);
strcat(string, scr);
format(scr, sizeof(scr), "`gPrice` = %d,", Garage[g][gPrice]);
strcat(string, scr);
format(scr, sizeof(scr), "`gBuyPrice` = %d,", Garage[g][gBuyPrice]);
strcat(string, scr);
format(scr, sizeof(scr), "`gInt` = %d,", Garage[g][gInt]);
strcat(string, scr);
format(scr, sizeof(scr), "`gVirtual` = %d,", Garage[g][gVirtual]);
strcat(string, scr);
format(scr, sizeof(scr), "`gLock` = %d,", Garage[g][gLock]);
strcat(string, scr);
format(scr, sizeof(scr), "`gPickup` = %d,", Garage[g][gPickup]);
strcat(string, scr);
format(scr, sizeof(scr), "`gType` = %d,", Garage[g][gType]);
strcat(string, scr);
format(scr, sizeof(scr), "`gDiscript` = '%s',", Garage[g][gDiscript]);
strcat(string, scr);
format(scr, sizeof(scr), " WHERE `gOwner` = '%s' LIMIT 1", Garage[g][gOwner]);
strcat(string, scr);
mysql_function_query(MysqlConnect, string, false, "", "");
}
