Converting a query (to RC7)
#9

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?
Yea, I'm answering my own question (for those who might have like thoughts).
Yes it is possible but not recommended. I ran a little test both ways (sending the query in the callback and outside). It turns out, sending the same query, inside it's callback would act like an infinite loop (it keeps executing the query)
whereas sending it from outside the callback only executed it once...this means I'll (we'll) have to create callbacks for EVERY single query.
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)