09.12.2013, 20:44
Hello I have a MySQL problem with ban system. It write in database player banned etc, but when I try to check if it is banned nothing happen. Table was InnoDB and I only changed it to MyISAM only at operation
This is the ban check...
Код:
stock jBanCheck( playerid )
{
format( jQuery, MAX_QUERY_LENGTH, "SELECT user_banner, ban_reason, TIMESTAMPDIFF(MINUTE, NOW(), DATE_ADD(ban_timestamp, INTERVAL ban_time MINUTE)) FROM `"#J_TABLE"` WHERE user_banned_ip = '%s' AND (NOW() <= DATE_ADD(ban_timestamp, INTERVAL ban_time MINUTE) OR ban_time = 0)", jIP[ playerid ] );
mysql_query_callback( QUERY_CHECKNAME, jQuery, "OnQueryFinish", playerid, jban_connection );
return ( 1 );
}

