Converting a query (to RC7)
#10

Quote:
Originally Posted by Tee
Посмотреть сообщение
What I want to know, do ALL my SELECT queries HAVE to be sent to a callback?
Also, can I send the query to the callback, from inside the callback? (like a self submitting form in HTML)

Example:

pawn Код:
//I call the function here...
CheckAccounts(playerid);

//Somewhere down in the script...
public CheckAccounts(playerid)
{
    format(query,sizeof(query),"SELECT ...");
    mysql_function_query(1,query,true,"CheckAccounts","i",playerid);
    //something else below...
    return 1;
}
Is that possible?
If you are using plugin R7, then yes, all queries which return data need to be threaded, and making the script fire a callback once query execution is finished seems to be the only way to do so.

That function cannot be done like that, because it will toggle an infinite loop - what your code does is query, then execute the same callback, then query again, execute the callback, etc.

@SuperViper: SELECT NULL ...
Reply


Messages In This Thread
Converting a query (to RC7) - by Tee - 04.06.2012, 23:42
Re: Converting a query (to RC7) - by AndreT - 04.06.2012, 23:56
Re: Converting a query (to RC7) - by Tee - 05.06.2012, 00:08
Re: Converting a query (to RC7) - by AndreT - 05.06.2012, 00:28
Re: Converting a query (to RC7) - by Tee - 05.06.2012, 00:44
Re: Converting a query (to RC7) - by Tee - 05.06.2012, 00:48
Re: Converting a query (to RC7) - by Calgon - 05.06.2012, 01:08
Re: Converting a query (to RC7) - by SuperViper - 05.06.2012, 01:10
Re: Converting a query (to RC7) - by Tee - 05.06.2012, 01:12
Re: Converting a query (to RC7) - by AndreT - 05.06.2012, 09:59

Forum Jump:


Users browsing this thread: 1 Guest(s)