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