djharbi2 Posted May 12, 2019 Share Posted May 12, 2019 (edited) Hi, mysql connection falls after some time databasen = setting.mysql function chac1() local acc = getPlayerAccount (client) local username = getAccountName ( acc ) local slot = getAccountData (acc,"characterslot") or "no" local veriable2s = mysql_query(databasen, "SELECT * FROM skinshop WHERE skinshop_username='"..username.."'") if veriable2s then local okey2 = mysql_fetch_assoc(veriable2s) for okey,row in mysql_rows(veriable2s) do c1 = row[3] c2 = row[4] end end mysql_free_result(veriable2s) end the first time it works, there is no problem, but then disconnects the database How can I solve Edited May 12, 2019 by djharbi2 Link to comment
Luxy.c Posted May 13, 2019 Share Posted May 13, 2019 (edited) Your best solution would be to switch to internal MySQL functions since the MySQL Module is pretty old now and some features might not be supported. (https://wiki.multitheftauto.com/wiki/DbConnect) Besides that, is the MySQL Server running on your own vServer / dedicated server ? If so, do you have any timeouts configured ? - Luxy.c Edited May 13, 2019 by Luxy.c 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