Hello everyone.
I tried to use this ban system.
I encountered with the problem when using sql mode:
PHP Code:
#if defined USING_SQL
PrepareTable()
{
new query[128];
formatex(query, sizeof(query) - 1,\
"CREATE TABLE IF NOT EXISTS `%s` (`%s` varchar(32) NOT NULL, `%s` varchar(35) NOT NULL, `%s` int(10) NOT NULL, `%s` varchar(32) NOT NULL, `%s` varchar(128) NOT NULL, `%s` varchar(64) NOT NULL, `%s` varchar(35) NOT NULL);",\
TABLE_NAME, KEY_NAME, KEY_STEAMID, KEY_BANLENGTH, KEY_UNBANTIME, KEY_REASON, KEY_ADMIN_NAME, KEY_ADMIN_STEAMID
);
//server_print(query);
SQL_ThreadQuery(g_sql_tuple, "QueryCreateTable", query);
}
PHP Code:
new query[128];
is not enought to make sql create request, and server throughts "Query failed." message.
It is more meaningful to have
PHP Code:
new query[512];
Thanks