07.05.2018, 16:14
Not save religion, skin and nationality.
Help me please.
MySQL Log:
Help me please.
PHP код:
stock SaveAccount(playerid)
{
new query_string[(1000)+(1000+11)+(20+MAX_PLAYER_NAME)+(16+30)] = "UPDATE `accounts` SET";
format(query_string, sizeof(query_string), "%s `player_name` = '%s',", query_string, pInfo[playerid][pName]);
format(query_string, sizeof(query_string), "%s `password` = '%s'", query_string, pInfo[playerid][pPassword]);
format(query_string, sizeof(query_string), "%s `sex` = '%d',", query_string, pInfo[playerid][pSex]);
format(query_string, sizeof(query_string), "%s `rasa` = '%d',", query_string, pInfo[playerid][pRasa]);
format(query_string, sizeof(query_string), "%s `religia` = '%d',", query_string, pInfo[playerid][pReligia]);
format(query_string, sizeof(query_string), "%s WHERE `id` = '%d'", query_string, pInfo[playerid][pID]);
mysql_function_query(mysql_connect_ID, query_string, false, "", "");
return printf("Äàííûå àêêàóíòà ¹ %d (%s) áûëè ñîõðàíåíû.", pInfo[playerid][pID], pInfo[playerid][pName]);
}
PHP код:
[19:10:20 05/07/18] [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 '`sex` = '1', `rasa` = '0', `religia` = '5', WHERE `id` = '68'' at line 1 (Query: "UPDATE `accounts` SET `player_name` = 'Devreyk', `password` = '12345' `sex` = '1', `rasa` = '0', `religia` = '5', WHERE `id` = '68'")
[19:10:23 05/07/18] [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 '`sex` = '1', `rasa` = '0', `religia` = '1', WHERE `id` = '69'' at line 1 (Query: "UPDATE `accounts` SET `player_name` = 'Dylan_Brown', `password` = 'пгорорроро' `sex` = '1', `rasa` = '0', `religia` = '1', WHERE `id` = '69'")