Jump to content

Unable to export SQL results


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...