/top10 with mysql.
#6

You could either use the count function in SQL or do the following

pawn Code:
stock ReturnUserCount()
{
    mysql_query("SELECT username FROM  `usertable`");
    mysql_store_result();
    new users = mysql_num_rows();
    mysql_free_result();
    return users;
}
I wouldn't really recommend calling that often if you had a big database.
Reply


Messages In This Thread
/top10 with mysql. - by budelis - 09.09.2011, 11:16
Re: /top10 with mysql. - by [HiC]TheKiller - 09.09.2011, 12:14
[No subject] - by budelis - 10.09.2011, 07:55
Re: /top10 with mysql. - by Vince - 10.09.2011, 10:39
Re: /top10 with mysql. - by budelis - 10.09.2011, 12:09
Re: /top10 with mysql. - by [HiC]TheKiller - 10.09.2011, 12:26
Re: /top10 with mysql. - by Gh0sT_ - 10.09.2011, 12:30
[No subject] - by budelis - 10.09.2011, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)