Jump to content

Using native mysql functions instead of the module


LonelyRoad

Recommended Posts

So I have been out of the MTA scene for a while, but now I am back and looking to continue with work on my own gamemode. More to the point, the last time I did work on said gamemode the module was the only method of working with a MySQL database.

Now, evidently, it is possible to use the native SQL functions instead, and I assume for many reasons it would be a good idea to convert my gamemode to using them instead.

Anyway, more on to the point of my post...

How can I actually change my scripts now, everything I've done was using functions from the module with a 'wrapper' resource to provide ability to do queries etc. Is there any updated wrapper that provides the same functionality but with the native SQL functions? (See old wrapper here)

Link to comment

Not sure how you can go about converting it, but here is a simple SQL 'wrapper' I created that provides 'query' and 'execute' functionality (the only two functions you really need). SQL.Connect needs to be called in order for the connection to be established. You can change the dbConnect arguments to change it to a MySQL database.

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