Error saving MySQL data
#5

MySQL log is clean.
But the data is still not saved.
PHP код:
stock CreateNewAccount(playeridpassword[])
{
    new 
query_string[1000+MAX_PLAYER_NAME-4+1000];
    
format(query_stringsizeof(query_string), "INSERT INTO `accounts` (`player_name`, `password`, `sex`, `rasa`, `religia`) VALUES ('%s', '%s', '%d', '%d', '%d')"pInfo[playerid][pName], passwordpInfo[playerid][pSex], pInfo[playerid][pRasa], pInfo[playerid][pReligia]);
    
mysql_function_query(mysql_connect_IDquery_stringtrue"UploadPlayerAccountNumber""i"playerid);
    
format(query_stringsizeof(query_string),"{FFFFFF}Шаг 1/4 {FF4500}|{FFFFFF} Пароль для аккаунта %s успешно сохранён."pInfo[playerid][pName]);
    
SendClientMessage(playerid0xFFFFFF00query_string);
    return 
1;
}
forward UploadPlayerAccount(playerid);
public 
UploadPlayerAccount(playerid)
{
    
pInfo[playerid][pID] = cache_get_field_content_int(0"id"mysql_connect_ID);
       
pInfo[playerid][pSex] = cache_get_field_content_int(0"sex"mysql_connect_ID);
    
pInfo[playerid][pRasa] = cache_get_field_content_int(0"rasa"mysql_connect_ID);
       
pInfo[playerid][pReligia] = cache_get_field_content_int(0"religia"mysql_connect_ID);
    
SendClientMessage(playerid0xFFFFFF00"{FF4500}| {FFFFFF}Вы успешно авторизировались!");
    
SpawnPlayer(playerid);
    return 
1;
}
/*  ========================================================================  */
stock SaveAccountplayerid )
{
    new 
query_string5000 ];
    
formatquery_stringsizeofquery_string ), "UPDATE `accounts` SET `player_name` = '%s', `sex` = '%s', `rasa` = '%s', \
    `religia` = '%s' WHERE `id` = '%d'"
pInfoplayerid ][ pName ], pInfoplayerid ][ pPassword ], pInfoplayerid ][ pSex ], pInfoplayerid ][ pRasa ],
    
pInfoplayerid ][ pReligia ], pInfoplayerid ][ pID ] );
    
mysql_function_querymysql_connect_IDquery_stringfalse"""" );
    return 
printf("Данные аккаунта № %d (%s) были сохранены."pInfo[playerid][pID], pInfo[playerid][pName]);

Reply


Messages In This Thread
Error saving MySQL data - by Kireykin - 07.05.2018, 16:14
Re: Error saving MySQL data - by FaLLenGirL - 07.05.2018, 16:24
Re: Error saving MySQL data - by Kireykin - 07.05.2018, 16:27
Re: Error saving MySQL data - by FaLLenGirL - 07.05.2018, 16:32
Re: Error saving MySQL data - by Kireykin - 07.05.2018, 16:39
Re: Error saving MySQL data - by FaLLenGirL - 07.05.2018, 16:43
Re: Error saving MySQL data - by Kireykin - 07.05.2018, 16:49
Re: Error saving MySQL data - by FaLLenGirL - 07.05.2018, 16:50
Re: Error saving MySQL data - by Kireykin - 07.05.2018, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)