Posts: 34
Threads: 14
Joined: Jun 2011
Reputation:
0
Hello,
I want to collect lines on MySQL so I used "MySQL_Count" fuction but I had a problem with it.
On the pop-up screen, I got "undefined symbol "MySQL_Count" alert.
Does anyone have an idea, how I can fix this problem?
Posts: 372
Threads: 63
Joined: Aug 2010
Reputation:
0
You could just use mysql_num_rows() and store it with mysql_store_result().
Posts: 952
Threads: 45
Joined: Aug 2010
Reputation:
0
Easy, I assume you want to could all registered players on the server from the database?
This is what I did:
[pwano]
CMD:registeredplayers(playerid, params[]) {
mysql_query("SELECT * FROM `accounts`");
mysql_store_result();
new string[128];
format(string, sizeof(string), "[SERVER]: There are currently %d currently registered players.", mysql_num_rows());
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
mysql_free_result();
return 1;
}
[/pawno]
* means ALL
samething can be done for total houses, total businesses, total tickets, etc.
Posts: 2,286
Threads: 18
Joined: Jun 2010