Retrieve name from SQL ID
#5

PHP код:
new DB_Query[256], DBResult:Result;
format(DB_Querysizeof(DB_Query), "SELECT Username FROM Table WHERE UserID = '%d';"GarageInfo[Garageid][garageOwnerID]);
Result db_query(DbNameDB_Query);
new 
player_name[MAX_PLAYER_NAME+1];
if(
db_num_rows(Result))
{
    
db_get_field(Result0player_name24);
    
//The owner of this garage is %s (player_name)
}
else
{
    
//not found
}
db_free_result(Result); 
Reply


Messages In This Thread
Retrieve name from SQL ID - by SymonClash - 22.02.2019, 09:11
Re: Retrieve name from SQL ID - by Banditul18 - 22.02.2019, 09:41
Re: Retrieve name from SQL ID - by SymonClash - 22.02.2019, 10:32
Re: Retrieve name from SQL ID - by SymonClash - 22.02.2019, 12:49
Re: Retrieve name from SQL ID - by Undef1ned - 22.02.2019, 13:06

Forum Jump:


Users browsing this thread: 1 Guest(s)