Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: danch
1. baza danch
hej, mam dziwny b??d w bazie danych wy?wietlaj?cy si? przy pr?bie zalogowania na pysie 3

to wychodzi z db3:
Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean]
Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil]


kod:
Cytat:

-- Functions
function startConnection()
ttHandler = dbConnect("mysql","dbname=mta_db;host=127.0.0.1","mta_user","123456")
if ttHandler then
outputDebugString("Toptimes Connection to database successfull")
else
ttHandler = nil
outputDebugString("Toptimes can't connect to database")
end
end

function dbSet(...)
if not {...} then return end
local query=dbExec(DBHandler, ...)
return query
end

function dbGet(...)
if not {...} then return end
local query=dbQuery(Handler, ...)
local result=dbPoll(query, -1)
return result
end
[/code]




kolejny b??d:
attemp to call global 'mysql_connect' (a nil value)

kod:
Cytat:

local root = getRootElement()

local SQL

local function connect()
SQL = mysql_connect(SQL_HOST, SQL_LOGIN, SQL_PASSWD, SQL_DB, SQL_PORT)
if (not SQL) then
outputServerLog("BRAK POLACZENIA Z BAZA DANYCH!")
else
mysql_query(SQL,"SET NAMES utf8")
end

end