Sign in to follow this  
djharbi2

[Help] Mysql Connection

Recommended Posts

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 by djharbi2

Share this post


Link to post

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 by Luxy.c

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.