..:D&G:.. Posted May 25, 2015 Share Posted May 25, 2015 Hello guys, I got this inventory system from community and it saves in MySQL, but I want to make it save in SQLite. I found this function: mysql_ping which seams to be from the MySQL module, what's the replacement of this function for SQLite? Thanks. Link to comment
tosfera Posted May 25, 2015 Share Posted May 25, 2015 Always close your connection of SQLite when you're not using it anymore. If it's not doing it by default, then you should do it. Keeping your connection open to your SQLite database can prevent it from being changed/result into rollbacks. Since MTA is handling SQLite different than most platforms, you should avoid opening/closing your connection. The dbConnect does have an optional parameter which reads; autoreconnect which can be set to 0 or 1. (Default value "autoreconnect=1"). When set to 1, dropped connections will automatically be reconnected. Note that session variables, user variables, table locks and temporary tables will be reset because of the reconnection. So if you use these fancy features, you will need to turn autoreconnect off and cope with dropped connections some other way. source; https://wiki.multitheftauto.com/wiki/DbConnect 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