Problem with get data MySQL
#1

Hello,
MySQL : R34

Log :
pawn Код:
[13:03:29] CheckAccount IS OK !
[13:03:29] OnAccountCheck IS OK !
[13:03:29] Get rows is OK! rows : - fields :
[13:03:29] pSQLid :  - pPass :

pawn Код:
stock CheckAccount(playerid)
{
    new query[82];
    printf("CheckAccount IS OK !");
    format(query, sizeof(query), "SELECT id, Password FROM `users` WHERE `Username` = '%s'", returnName(playerid));
    mysql_function_query(1, query, true, "OnAccountCheck", "d", playerid);
    return 1;
}
pawn Код:
forward OnAccountCheck(playerid);
public OnAccountCheck(playerid)
{
    printf("OnAccountCheck IS OK !");
    if(playerid != INVALID_PLAYER_ID)
    {
   
        new rows, fields;
        cache_get_data(rows, fields);
        printf("Get rows is OK! rows : %s - fields : %s",rows,fields);
       
        if(rows)
        {
            Player[playerid][pSQLid] = cache_get_row_int(0, 0);
            cache_get_row(0, 3, Player[playerid][pPass], 1, 130);      
            printf("pSQLid : %s - pPass : %s",Player[playerid][pSQLid],Player[playerid][pPass]);
            ShowLoginScreen(playerid);
        }
        else
        {
            ShowRegisterScreen(playerid);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Problem with get data MySQL - by MRM - 02.07.2016, 08:42
Re: Problem with get data MySQL - by SyS - 02.07.2016, 08:43
Re: Problem with get data MySQL - by MRM - 02.07.2016, 08:45
Re: Problem with get data MySQL - by MRM - 02.07.2016, 08:50
Re: Problem with get data MySQL - by xJayce - 02.07.2016, 08:51
Re: Problem with get data MySQL - by BroZeus - 02.07.2016, 09:02
Re: Problem with get data MySQL - by MRM - 02.07.2016, 09:20
Re: Problem with get data MySQL - by [cS]Owain - 02.07.2016, 09:31
Re: Problem with get data MySQL - by MRM - 02.07.2016, 09:41

Forum Jump:


Users browsing this thread: 1 Guest(s)