View Single Post
MM3
Zero Posts
Join Date: Dec 2011
Old 12-04-2011 , 08:05   Re: Advanced Bans SQL
Reply With Quote #5

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(querysizeof(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_NAMEKEY_NAMEKEY_STEAMIDKEY_BANLENGTHKEY_UNBANTIMEKEY_REASONKEY_ADMIN_NAMEKEY_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

Last edited by MM3; 12-04-2011 at 08:07.
MM3 is offline