Total players registered
#1

hi,can someone tell me how can I make MYSQL,by /123 , There are X player accounts.. but I don't know how..
Reply
#2

Could you provide some more information? I'm assuming you've got a MySQL database and want to count the player accounts? You can do that using MySQL's COUNT function.
Reply
#3

yes account name is "account" ... and im new,and I cant find tutorial for this kind,
Reply
#4

What you want to do is... SELECT everything from the table ACCOUNTS and then use the inbuilt function; cache_get_row_count(); to get the number of rows.

PHP код:
new query[24];
mysql_format(connectionquerysizeof(query), "SELECT * FROM Accounts;");
mysql_tquery(connectionquery"CheckQuery1");
format CheckQuery1();
public 
CheckQuery1()
{
    
printf("Number of Accounts: %d."cache_get_row_count());

Reply
#5

thanks!reped!
Reply
#6

Deleted *Wrong quote*.
Reply
#7

it appears that are 0 accounts..don't know wghy..
Reply
#8

What is the name of your SQL table that stores your accounts? Replace that with the SQL Query.

PHP код:
new query[24]; 
mysql_format(connectionquerysizeof(query), "SELECT * FROM SQLTableNameInsertHere;"); 
mysql_tquery(connectionquery"CheckQuery1"); 
format CheckQuery1(); 
public 
CheckQuery1() 

    
printf("Number of Accounts: %d."cache_get_row_count()); 

Reply
#9

forward or format??

format CheckQuery1(); ??
Reply
#10

Quote:
Originally Posted by Ugaustin
Посмотреть сообщение
forward or format??

format CheckQuery1(); ??
forward* my bad.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)