SQL not retrieving
#1

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayerInfo[playerid][Logged] = 0;
   
    new query[128];
    mysql_format(g_Handle, query, sizeof(query), "SELECT * FROM `users` WHERE `name` = '%e' LIMIT 1", GetPName(playerid));
    mysql_tquery(g_Handle, query, "CheckPlayerExists", "i", playerid);

    return 1;
}
pawn Код:
public CheckPlayerExists(playerid)
{
    new rows, fields;
    cache_get_data(rows, fields, g_Handle);
    if(rows)
    {
        cache_get_field_content(0, "password", PlayerInfo[playerid][Password]);
        printf("%s", PlayerInfo[playerid][Password]); //debug
        print("Exists!); //debug
        ShowLogin(playerid);
    }
    else
    {
        print("
Does not exist."); //debug
        ShowRegister(playerid);
    }
    return 1;
}

This is not retrieving the password from the database and I can't figure out why. I'm using blueG's r39-3 and recently converted to it so I guess I did something wrong. Can anyone correct me?
Reply


Messages In This Thread
SQL not retrieving - by austin070 - 29.09.2015, 19:29
AW: SQL not retrieving - by Kaliber - 29.09.2015, 19:31
Re: SQL not retrieving - by austin070 - 29.09.2015, 19:32
AW: SQL not retrieving - by Kaliber - 29.09.2015, 19:33
Re: SQL not retrieving - by austin070 - 29.09.2015, 19:39
Re: SQL not retrieving - by PrO.GameR - 29.09.2015, 19:42
Re: SQL not retrieving - by austin070 - 29.09.2015, 19:59

Forum Jump:


Users browsing this thread: 1 Guest(s)