Karol998 Posted April 9, 2019 Share Posted April 9, 2019 Cześć drogi użytkowniku, piszę na tym forum ze względu na problem ze skryptem na łączenie z bazą danych, a mianowicie: [19-04-09 09:51] WARNING: [EMS]/DB/sql9384571.lua:31: dbPoll failed; Unknown column 'exp' in 'field list' [19-04-09 09:51] WARNING: [EMS]/DB/sql9384571.lua:31: dbPoll failed; Unknown column 'exp' in 'field list' [DUP x2] --[[ Interfejs obsługi bazy danych - nakładka na funkcje db... ]]-- local root = getRootElement() local SQL local function connect() SQL = dbConnect("mysql", "dbname=*******;host=137.74.0.12;port=3306","*******","*******","share=0") 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) ------------ LINIJKA 31 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 end function nullCallback(qh) dbFree(qh) end function szybkieZapytanie(...) local h=dbQuery(nullCallback,SQL,...) end function insertID() local r=pobierzWyniki("select last_insert_id() lid") return r.lid end --[[ function affectedRows() return mysql_affected_rows(SQL) end ]]-- function fetchRows(query) local result=mysql_query(SQL,query) if (not result) then return nil end local tabela={} while true do local row = mysql_fetch_row(result) if (not row) then break end table.insert(tabela,row) end mysql_free_result(result) return tabela end -- left for compatibility function esc(s) return string.gsub(s,"['\"\]","") end Link to comment
Ciastuuś Posted April 27, 2019 Share Posted April 27, 2019 Nie posiadasz kolumny o nazwie 'exp' Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now