How many accounts in database
#5

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
You could run a simple query to retrieve how many rows you have.

Assuming you're using G-sTyLeZzZ's MySQL plugin:

pawn Код:
mysql_query('SELECT COUNT(Name) FROM `table`');
mysql_store_result();
printf("Number of accounts: %d", mysql_fetch_int());
mysql_free_result();
Hope that helps!

(The difference between my code and the other snippets posted before mine, is that the other snippets select all information in the table and store it, which is an unnecessary amount of processing)
And how can I display it.

That before your post, it says only 1 player, but there is around 500.

EDIT: Got it
Reply


Messages In This Thread
How many accounts in database - by NewbBeginner - 18.11.2010, 15:14
Re: How many accounts in database - by Kyle - 18.11.2010, 15:17
Re: How many accounts in database - by [NoV]LaZ - 18.11.2010, 15:17
Re: How many accounts in database - by JaTochNietDan - 18.11.2010, 15:19
Re: How many accounts in database - by NewbBeginner - 18.11.2010, 15:26
Re: How many accounts in database - by JaTochNietDan - 18.11.2010, 15:28
Re: How many accounts in database - by NewbBeginner - 18.11.2010, 15:29
Re: How many accounts in database - by Hiddos - 18.11.2010, 15:31
Re: How many accounts in database - by JaTochNietDan - 18.11.2010, 15:32
Re: How many accounts in database - by NewbBeginner - 18.11.2010, 15:34

Forum Jump:


Users browsing this thread: 1 Guest(s)