How do I Thread the queries?(MySQL) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: How do I Thread the queries?(MySQL) (
/showthread.php?tid=558572)
How do I Thread the queries?(MySQL) -
Lynn - 17.01.2015
This is what I have;
http://pastebin.com/Bxek1215
However I am lost on how to thread the queries.
Should I just re-write everything using the methods I know?
Or is there a more simple way to go about this...?
I just started using R39-2 So I am getting stuck now and then.
Re: How do I Thread the queries?(MySQL) -
Dignity - 17.01.2015
Pretty sure all you have to do is:
pawn Код:
mysql_format(handle, query, sizeof(query), "");
mysql_tquery(handle, query);
instead of
pawn Код:
format(query, sizeof(query), "");
mysql_query(query);
Re: How do I Thread the queries?(MySQL) -
Abagail - 18.01.2015
You can thread queries by replacing mysql_query with mysql_tquery. It's not that hard at all, Mionee pretty much just summed it up above this post.
Re: How do I Thread the queries?(MySQL) -
zT KiNgKoNg - 18.01.2015
Not to be a dick or anything but this should really be in "Scripting Help", not server support as its related more to the code.
But as Abagail said.
Quote:
Originally Posted by Abagail
You can thread queries by replacing mysql_query with mysql_tquery. It's not that hard at all, Mionee pretty much just summed it up above this post.
|
Also note there is a define in the include that allows you to use the mysql_query but in my experience it didn't work so I also switched to mysql_tquery.
pawn Код:
Will update once I get the define.
Re: How do I Thread the queries?(MySQL) -
Lynn - 18.01.2015
Quote:
Originally Posted by Mionee
Pretty sure all you have to do is:
pawn Код:
mysql_format(handle, query, sizeof(query), ""); mysql_tquery(handle, query);
instead of
pawn Код:
format(query, sizeof(query), ""); mysql_query(query);
|
Thank you.
Quote:
Originally Posted by zT KiNgKoNg
Not to be a dick or anything but this should really be in "Scripting Help", not server support as its related more to the code.
But as Abagail said.
Also note there is a define in the include that allows you to use the mysql_query but in my experience it didn't work so I also switched to mysql_tquery.
pawn Код:
Will update once I get the define.
|
Yes I know it's the wrong section, but I didn't realize it until after I hit submit.