-- Settings
DBHandler=nil
DBName="db_59611"
DBUser="db_59611"
DBPass="9z18b6pB7I70"
DBHost="51.83.136.0"
-- Functions
-- Functions
function dbSet(...)
if not {...} then return end
local qh = dbQuery(DBHandler, ...)
if not qh then return false end
local result, num_affected_rows, last_insert_id = dbPoll(qh, -1)
return result, num_affected_rows, last_insert_id
end
function dbGet(...)
if not {...} then return end
local stringe=dbPrepareString(DBHandler,...)
local query=dbQuery(DBHandler, stringe)
local result,num_affected_rows, last_insert_id =dbPoll(query, -1)
return result
end
addEventHandler("onResourceStart", resourceRoot, function()
DBHandler=dbConnect("mysql", "dbname="..DBName..";host="..DBHost.."", DBUser, DBPass, "share=1")
if DBHandler then
outputDebugString("* Connect to server MYSQL...")
else
outputDebugString("* No Connecting to server MYSQL..")
end
end)