Counting players MYSQL
#1

Cant get to work this code
I am trying to count all members from the faction but it doesnt works
pawn Код:
new query [ 124 ];
    format(query, sizeof(query), "SELECT Faction FROM players WHERE Faction = '%s'", PlayerInfo[playerid][playerteam]);
    mysql_query(query);
    mysql_store_result();
    new rows = mysql_num_rows();
    mysql_free_result();
and then iam using it like this
pawn Код:
format(iStr, sizeof(iStr), " F-Members: %d/%d", rows, dini_Int(tmpf,"fmemberslots"));
        SendClientMessage(playerid, COLOR_WHITE, iStr);
But its displaying 0 while there are more then 3 members.
Whats wrong here?
Reply


Messages In This Thread
Counting players MYSQL - by MadafakaPro - 13.01.2014, 11:43
Re: Counting players MYSQL - by iJumbo - 13.01.2014, 11:48
Re: Counting players MYSQL - by iBots - 13.01.2014, 12:26
Re: Counting players MYSQL - by MadafakaPro - 13.01.2014, 12:27
Re: Counting players MYSQL - by iJumbo - 13.01.2014, 12:44
Re: Counting players MYSQL - by RajatPawar - 14.01.2014, 04:05
Re: Counting players MYSQL - by Vince - 14.01.2014, 06:49

Forum Jump:


Users browsing this thread: 1 Guest(s)