Get name frome id [MYSQL] +rep
#6

Give it a whack

pawn Код:
stock GetNameFID(NomFID)
{
    new idName[26];
    F(query, sizeof(query), "SELECT `name` FROM `accounts` WHERE `id` = '%d'", playerInfo[NomFID][id]);
    mysql_query(query);
    mysql_store_result();
    if(!mysql_num_rows())
    {
        print("Unable to load");
        mysql_free_result();
        return 0;
    }
    else if(mysql_num_rows() != 0)
    {
        while(mysql_fetch_row_format(query, "|"))
        {
            mysql_fetch_field_row(idName, "name"); F(playerInfo[NomFID][name], 32, "%s", idName);
        }
    }
    mysql_free_result();
    return 1;
}
Reply


Messages In This Thread
Get name frome id [MYSQL] +rep - by StreetRP - 10.01.2015, 19:42
Re: Get name frome id [MYSQL] +rep - by bgedition - 10.01.2015, 19:53
Re : Get name frome id [MYSQL] +rep - by StreetRP - 10.01.2015, 20:34
Re : Get name frome id [MYSQL] +rep - by StreetRP - 11.01.2015, 11:24
Re: Get name frome id [MYSQL] +rep - by biker122 - 11.01.2015, 11:33
Re: Get name frome id [MYSQL] +rep - by Ironboy - 11.01.2015, 11:39
Re: Get name frome id [MYSQL] +rep - by ea8de1 - 11.01.2015, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)