MySQL Wiz Biz
#7

PHP код:
UserFromID(IDUserID[MAX_PLAYER_NAME])
{
    new 
query[200];
    
mysql_format(MySQLquerysizeof(query), "SELECT `Username` FROM `Users` WHERE `ID` = %d LIMIT 0,1"ID);
    new 
Cache:Result mysql_query(MySQLquery);
    if(
cache_num_rows()) cache_get_field_content(0"Username"UserIDMySQLsizeof(UserID));
    else 
UserID "NULL";
    
cache_delete(Result);
    return 
1;

usage:

PHP код:
   new name[MAX_PLAYER_NAME];
   
UserFromID(ID,name);
   
// THe Name will be player name you wanna get you can print it to see
   
printf("%s",name); 
Reply


Messages In This Thread
MySQL Wiz Biz - by DeathKing - 22.03.2016, 07:59
Re: MySQL Wiz Biz - by SickAttack - 22.03.2016, 08:19
Re: MySQL Wiz Biz - by Sabur - 22.03.2016, 08:35
Re: MySQL Wiz Biz - by SickAttack - 22.03.2016, 08:39
Re: MySQL Wiz Biz - by DeathKing - 22.03.2016, 09:09
Re: MySQL Wiz Biz - by introzen - 22.03.2016, 09:20
Re: MySQL Wiz Biz - by jlalt - 22.03.2016, 09:26
Re: MySQL Wiz Biz - by DeathKing - 22.03.2016, 10:14

Forum Jump:


Users browsing this thread: 2 Guest(s)