mysql_pquery question on callback being called.
#4

I don't understand why can't you just execute the appropriate queries to that script and need to do it remotely.
If for whatever reason you have, you want to load data to another script than the one you executed the query, you can save the result in memory and pass it to the other script, retrieve data and delete it. I just tested it with different connection handles and different selected databases and there's no problem.

pawn Код:
// gamemode:
mysql_tquery(connection_handle, query, "OnLoadSomething", "");

forward OnLoadSomething();
public OnLoadSomething()
{
    CallRemoteFunction("fs_OnLoadSomething", "i", _: cache_save());
}
pawn Код:
// filterscript:
forward fs_OnLoadSomething(Cache: cache_id);
public fs_OnLoadSomething(Cache: cache_id)
{
    if (!cache_is_valid(cache_id)) return;
   
    cache_set_active(cache_id);

    // cache functions to retrieve..
   
    cache_set_active(Cache: 0);
    cache_delete(cache_id);
}
Reply


Messages In This Thread
mysql_pquery question on callback being called. - by AroseKhanNiazi - 26.06.2016, 01:24
Re: mysql_pquery question on callback being called. - by AroseKhanNiazi - 29.06.2016, 14:09
Re: mysql_pquery question on callback being called. - by Stinged - 29.06.2016, 14:43
Re: mysql_pquery question on callback being called. - by Konstantinos - 29.06.2016, 15:16
Re: mysql_pquery question on callback being called. - by AroseKhanNiazi - 01.07.2016, 16:35

Forum Jump:


Users browsing this thread: 3 Guest(s)