Jump to content

help for mysql (connection)


plasha

Recommended Posts


Hello I have a problem to link my database to the server may help me i have already try a lot of solution my nothing is thank you for your help and sorry for my English which are very bad

 

 

 
 
 
 

 

 

 

 

local MYSQL = {}


MYSQL.connection = nil

function MYSQL.checkConnection()
    MYSQL.connection = dbConnect  ("mysql","dbname=zmarerougedu72;host=localhost", "marerougedu7", "xxxxxxx", "autoreconnect=1")
end
addEventHandler("onResourceStart", resourceRoot, MYSQL.checkConnection)

function requestConnection()
    if not MYSQL.connection then
        outputChatBox("[LSRP - Connection] Conexi�n perdida!")
        return
    end
    return MYSQL.connection
end

Link to comment
  • 2 weeks later...

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