new stats[128]; format(stats, sizeof(stats), "UPDATE ServerStats SET TotalAccounts = TotalAccounts + 1"); mysql_function_query(mConnectionHandle, stats, false, "", "");
new stats[128];
format(stats,sizeof(stats), "UPDATE ServerStats SET TotalAccounts = TotalAccounts + 1");
mysql_query(stats);
new stats[128]; mysql_format(mConnectionHandle, stats, sizeof(stats), "UPDATE ServerStats SET TotalAccounts = TotalAccounts + 1"); mysql_tquery(mConnectionHandle, stats);
CMD:printtotalacc(playerid, params[])
{
mysql_tquery(mConnectionHandle, "SELECT TotalAccounts FROM ServerStats", "PrintTotalAcc", "d", playerid);
return 1;
}
forward PrintTotalAcc(playerid);
public PrintTotalAcc(playerid)
{
printf("Total Accs: %d", cache_get_row_int(0, 0, mConnectionHandle));
return SendClientMessage(playerid, 0x00cc00FF, "Total accounts printed in server log!");
}
"SELECT * FROM Player_table"
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);
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 |
mysql_tquery(mConnectionHandle, "SELECT * FROM Accounts", "Query1", "d", playerid);
forward public Query1();
Query1()
{
new s[30]; format(s, sizeof(s), "Total Accounts: %d", cache_get_row_count()), SendClientMessage(playerid, -1, s);
return 1;
}