|
Author
|
Message
|
|
Senior Member
Join Date: Oct 2006
Location: The internet
|

01-09-2007
, 22:13
Re: SQLx to global variable problem
|
#1
|
Yeah. I give the global variable the data in the SQL query handler, and even print it out right before the PLUGIN_CONTINUE is returned, yet a line after the threadquery, I'll display the same global variable (which is not passed into the function, just used), and it will be the same as it was before it was given a new value in the ThreadQuery handler.
[Edit] I figured out what the problem is... and I'm not sure what to do about it. The data is being retrieved and stored correctly, but in the function I was using (since SQLx is threaded), the function expected the database to be done before the next line of code was executed, and this was not the case.
So... How would I get around this problem?
It will cause problems for things such as when a user opens a list of items that are retrieved from the database right before they are displayed. If this problem continues for that situation, they'll have a blank list of items. Is there any way to tell a function to wait for the threaded query to return a result before continuing?
I need my plugin to act synchronous, even though threaded queries are not. I want this to be able to run smoothely on laggy servers, but I still need to know when data has been retrieved, because otherwise, I have some big problems.
Last edited by Bad_Bud; 01-09-2007 at 23:52.
|
|
|
|