why mysql callback doesnt process?
#1

I use mysql plugin r7
Код:
mysql_function_query(mysql_Account, query, false, "IsResultExist","i",i);
Reply
#2

any one knows that?
Reply
#3

Check what this outputs:

Код:
public OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle)
{
printf("(%i) %s",errorid, error);
}
Reply
#4

Quote:
Originally Posted by jonrb
Посмотреть сообщение
Check what this outputs:

Код:
public OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle)
{
printf("(%i) %s",errorid, error);
}
that's not error exist. In mysql_log.txt that is wrote about query success. So IsResultExist should be runned.

[18:00:18] Passing query SELECT `Id` FROM `Account` WHERE `Name`='Mxtdg_Goodx' limit 1 | i
[18:00:18] ProcessQueryThread(IsResultExist) - Query was successful. (SELECT `Id` FROM `Account` WHERE `Name`='Mxtdg_Goodx' limit 1)
[18:00:18] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
Reply
#5

Need help..
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
Can you show your "IsResultExist" function?
Can you reply the pm message?
Код:
forward IsResultExist(handleid);
public IsResultExist(handleid)
{
    SendClientMessageToAll(COLOR_RED,"IsResultExist Runned");
    mysql_store_result_Account();
    if(!mysql_num_rows_Account())
    {
	mysql_Result_Check[handleid] = 0;
    }
	else
	{
	mysql_Result_Check[handleid] = 1;
	}
	mysql_free_result_Account();
return 1;
}
Reply
#7

This need to be like this:
pawn Код:
mysql_function_query(mysql_Account, query, false, "IsResultExist","i",playerid);
If you don't need return of playerid use something else.
Reply
#8

You disabled cache.
Код:
mysql_function_query(mysql_Account, query,true, "IsResultExist","i",playerid);
Код:
public IsResultExist(handleid)
{
    new rows,fields;
    cache_get_data(rows,fields);
    if(rows)
    {
    }
    else
    {
    }
    return 1; // No need for mysql_free_result if you return it.
}
Reply
#9

Quote:
Originally Posted by coakiddo
Посмотреть сообщение
You disabled cache.
Код:
mysql_function_query(mysql_Account, query,true, "IsResultExist","i",playerid);
Код:
public IsResultExist(handleid)
{
    new rows,fields;
    cache_get_data(rows,fields);
    if(rows)
    {
    }
    else
    {
    }
    return 1; // No need for mysql_free_result if you return it.
}
You think I must enable cache to use mysql_function_query? But I have seen the a_mysql include
Код:
#define mysql_query(%1,%2,%3,%4) \
	mysql_function_query(%4,%1,false,"OnQueryFinish","siii",%1,%2,%3,%4)
So I think I don't need use cache.
Reply
#10

Quote:
Originally Posted by coakiddo
Посмотреть сообщение
You disabled cache.
Код:
mysql_function_query(mysql_Account, query,true, "IsResultExist","i",playerid);
Код:
public IsResultExist(handleid)
{
    new rows,fields;
    cache_get_data(rows,fields);
    if(rows)
    {
    }
    else
    {
    }
    return 1; // No need for mysql_free_result if you return it.
}
I tried to enable cache but I got same result.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)