PeacefulDreams Posted December 8, 2015 Share Posted December 8, 2015 Heya! I created a sort of 'global' mysql resource to avoid having to establish a MySQL connection per resource. Using the MTA MySQL module, as I'm more comfortable with not using callbacks, I created a script that exports the following functions ( exports.mysql: ) connect, close, query and getHandler() to retrieve the handler. For some reason, whatever it is I do, all functions return a userdata type variable instead of a result while the script runs perfectly fine when I run queries within the resource. Is there something I need to switch on or some sort of division to what variables can be shared and what not? They certainly aren't local, but aren't accessible outside of the script either. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now