18.11.2010, 15:19
You could run a simple query to retrieve how many rows you have.
Assuming you're using G-sTyLeZzZ's MySQL plugin:
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)
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();
(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)