Raised This Month: $ Target: $400
 0% 

SQLx to global variable problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-09-2007 , 22:13   Re: SQLx to global variable problem
Reply With Quote #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.
Bad_Bud is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode