get result mysql r39 +rep
#1

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
Reply
#2

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.
Reply
#3

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.
Reply
#4

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)