Returning data using threaded queries?
#2

No, you can't. But you can still do that by using mysql_query().
Example:
Код:
CMD:test(playerid,params[]) {
	new query[128], Cache:qcache;
	mysql_format(mysql,query,sizeof(query),"SELECT * FROM sometable");
	qcache = mysql_query(mysql, query, true); // Remember to save the cache into a variable so you can delete this later to free up your memory
	// ... cache_ stuff here
	cache_delete(qcache);	
	return true;
}
Inline example: (You need y_inline from YSI to use tquery_inline)
Код:
CMD:test(playerid,params[]) {
    new query[128];

    inline InlineCallback(bla)
    {
        // ... cache_ stuff here
    }

    mysql_format(mysql,query,sizeof(query),"SELECT * FROM sometable");
    mysql_tquery_inline(mysql, query, using inline InlineCallback, "d", playerid);
    return true;
}
Reply


Messages In This Thread
Returning data using threaded queries? - by TwinkiDaBoss - 20.11.2016, 03:14
Re: Returning data using threaded queries? - by X337 - 20.11.2016, 08:11

Forum Jump:


Users browsing this thread: 1 Guest(s)