SA-MP Forums Archive
mYSQL r7 from Blue G - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mYSQL r7 from Blue G (/showthread.php?tid=354984)



mYSQL r7 from Blue G - mati233 - 28.06.2012

Hello,
My gamemode started to get a little lag because I had too many queries, so I've updated my mysql plugin to r7, and transformed everything to work as multi threaded, but now I'm facing a little problem. There are some queries that I don't want to work in other thread, and I tried something like this:
mysql_function_query(conn, "SELECT * FROM tabley ORDER BY id ASC", true, "", "");
cache_get_data(rows, fields, conn);
but when I print rows there is a huge number of rows that is not possible to be on my database.
Is this possible to do or am I doing something wrong?
I hope someone can give me a little help with this.

Thanks


Re: mYSQL r7 from Blue G - Jason` - 28.06.2012

When use cache you'll need call a callback

mysql_function_query(conn, "SELECT * FROM tabley ORDER BY id ASC", true, "CallBack", "CallBackParametersSpecifiers", {Float,_}:...);


Re: mYSQL r7 from Blue G - HuSs3n - 28.06.2012

u need to post your code


Re: mYSQL r7 from Blue G - mati233 - 28.06.2012

Thank you, but I know how to work with the callbacks, my doubt is how to do it without the callback...
I saw in mysql r7 plugin page that this version doesn't handle non threaded queries, but the r6 handle both.
If I move back to r6, can you give me an example about how to use a threaded query and non threaded?
I just a need a little help to understand how it works, I'm not really interested in asking for any fix on my code.
Thank you guys


Re: mYSQL r7 from Blue G - SWEMike - 30.06.2012

Check out some MySQL gamemodes and see how they work, that'd probably be the best way.