#1

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

Код:
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 );
}
This is the ban check...
Reply
#2

Nobody?...
Reply
#3

Show us the callback code? The OnQueryFinish?
Reply
#4

1. Run a query.
2. Save the result using mysql_store_result
3. Check if mysql_num_rows >= 1 then display a msg to the user
4. Free the result using mysql_free_result
Reply
#5

I solved, was my error, I did a wrong symbol, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)