[center][b]Witam, mam problem macie ss: SS Czym to mo?e by? spowodowane? [/b][/center]
Kod:
[code]--[[
Obsluga baz danych, interfejs do bazy MySQL realizowany za pomoca wbudowanych w MTA funkcji db...
@author Lukasz Biegaj <[email protected]>
@author WUBE <[email protected]>
@copyright 2011-2013 Lukasz Biegaj <[email protected]>
@license Dual GPLv2/MIT
@package MTA-XyzzyRP
@link https://github.com/lpiob/MTA-XyzzyRP GitHub
]]--
local SQL = dbConnect("mysql", "dbname=db_.....;host=94.23.90.14", "db_.....","haslo","share=1")
local function connect()
-- w ponizszej linii uzupelnij dane autoryzacji
SQL = dbConnect("mysql", "dbname=db_.....;host=94.23.90.14", "db_.....","haslo","share=1")
if (not SQL) then
outputServerLog("BRAK POLACZENIA Z BAZA DANYCH!")
else
zapytanie("SET NAMES utf8;")
end
end
addEventHandler("onResourceStart",resourceRoot, connect)
function pobierzTabeleWynikow(...)
local h=dbQuery(SQL,...)
if (not h) then
return nil
end
local rows = dbPoll(h, -1)
return rows
end
function pobierzWyniki(...)
local h=dbQuery(SQL,...)
if (not h) then
return nil
end
local rows = dbPoll(h, -1)
if not rows then return nil end
return rows[1]
end
function zapytanie(...)
local h=dbQuery(SQL,...)
local result,numrows=dbPoll(h,-1)
return numrows
en... |