Small help
#8

BroZeus since i have to place your code inside the registration callback i edited a bit:

Код:
new stats[128];
			mysql_format(mConnectionHandle, stats, sizeof(stats), "UPDATE ServerStats SET TotalAccounts = TotalAccounts + 1");
			mysql_tquery(mConnectionHandle, stats);
			
			mysql_tquery(mConnectionHandle, "SELECT TotalAccounts FROM ServerStats");
			
			new name[24];
			GetPlayerName(playerid, name, sizeof(name));
			format(irc,sizeof(irc),"1,3%s (%d) has registered a new account. Total accounts registered: %d",name,playerid,cache_get_row_int(0, 0, mConnectionHandle));
			IRC_GroupSay(groupID, IRC_CHANNEL, irc);
			IRC_GroupSay(groupID, IRC_ACHANNEL, irc);
Seems the TotalAccounts row is not updating:

Quote:

16:13:17] [DEBUG] mysql_format - connection: 0, len: 128, format: "UPDATE ServerStats SET TotalAccounts = TotalAccounts + 1"
[16:13:17] [ERROR] mysql_format - invalid connection handle (id: 0)
[16:13:17] [DEBUG] mysql_tquery - connection: 0, query: "", callback: "(null)", format: "(null)"
[16:13:17] [ERROR] mysql_tquery - invalid connection handle (id: 0)
[16:13:17] [DEBUG] mysql_tquery - connection: 0, query: "SELECT TotalAccounts FROM ServerStats", callback: "(null)", format: "(null)"
[16:13:17] [ERROR] mysql_tquery - invalid connection handle (id: 0)
[16:13:17] [DEBUG] cache_get_row_int - row: 0, field_idx: 0, connection: 0

Reply


Messages In This Thread
Small help - by Face9000 - 06.10.2015, 23:04
Re: Small help - by Galletziz - 06.10.2015, 23:15
Re: Small help - by Jefff - 06.10.2015, 23:36
Re: Small help - by Affan - 07.10.2015, 07:28
Re: Small help - by Face9000 - 07.10.2015, 10:08
Re: Small help - by BroZeus - 07.10.2015, 14:00
Re: Small help - by PrO.GameR - 07.10.2015, 14:23
Re: Small help - by Face9000 - 07.10.2015, 20:12
Re: Small help - by d1git - 07.10.2015, 20:37
Re: Small help - by Face9000 - 07.10.2015, 20:51

Forum Jump:


Users browsing this thread: 1 Guest(s)