Mysql row into string
#6

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
MySQL servers still have PlayerInfo because it's used to store player's data so you don't have to retrieve all of the player's data from the MySQL database all of the time, which is very slow.

To check if a player is banned, use this:

pawn Код:
new query[128];
GetPlayerName(playerid, query, sizeof(query));
format(query, sizeof(query), "SELECT `banned` FROM `users` WHERE `name` = '%s' AND `banned` = '1'", query);
mysql_query(query);
mysql_store_result();

if(mysql_num_rows())
{
    // banned
    return mysql_free_result();
}

mysql_free_result
That look eerily similar to my code.
Reply


Messages In This Thread
Mysql row into string - by [BG]PREDATOR - 06.05.2012, 13:37
Re: Mysql row into string - by mprofitt - 06.05.2012, 13:49
Re: Mysql row into string - by [BG]PREDATOR - 06.05.2012, 13:57
Re: Mysql row into string - by mprofitt - 06.05.2012, 14:09
Re: Mysql row into string - by SuperViper - 06.05.2012, 14:14
Re: Mysql row into string - by mprofitt - 06.05.2012, 14:32
Re: Mysql row into string - by [BG]PREDATOR - 06.05.2012, 14:43
Re: Mysql row into string - by mprofitt - 06.05.2012, 14:50
Re: Mysql row into string - by mprofitt - 06.05.2012, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)