SA-MP Forums Archive
get result mysql r39 +rep - 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: get result mysql r39 +rep (/showthread.php?tid=571835)



get result mysql r39 +rep - iBots - 22.04.2015

well i wanna use mysql_query and store result after it and detect if it is 1 or 0,how can i do it i tried mysql_store_result it says undefined symbol


Re: get result mysql r39 +rep - Sithis - 22.04.2015

You can't store result in R39. You need to specify a callback to handle the result. Check the documentation for R39 or search for a tutorial.


Re: get result mysql r39 +rep - Konstantinos - 22.04.2015

Quote:
Originally Posted by Sithis
Посмотреть сообщение
You can't store result in R39. You need to specify a callback to handle the result. Check the documentation for R39 or search for a tutorial.
Actually you can by using inline with threaded queries or non-threaded queries (https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_query).

Though I don't see any reason why you wouldn't want to do it with threaded queries and return the rows there. It's much faster.


Re: get result mysql r39 +rep - Sithis - 23.04.2015

You can't do non threaded queries, not even with y_inline. The inline functions are also callbacks.


Re: get result mysql r39 +rep - Konstantinos - 23.04.2015

Did you read the link above?
Quote:

This native sends a non-threaded query to the MySQL server. The SA:MP server (the main PAWN thread) waits until the query has been executed and then returns the cache handle.

so it's still possible in R33+ as I said with just a different way.

Also the reason I mentioned y_inline is because he can still use threaded queries and call the specific callback at the same place, basically what he wants without having to use non-threaded which is slower.