Nutella Posted May 22, 2016 Share Posted May 22, 2016 function pobierzTabeleWynikow(query) local result=dbQuery(SQL,query) if (not result) then outputDebugString("mysql_query failed: (" .. mysql_errno(SQL) .. ") " .. mysql_error(SQL)) -- Show the reason return nil end local tabela={} for result,row in mysql_fetch_assoc(result) do table.insert(tabela,row) end mysql_free_result(result) return tabela end This bit of code throws: [2016-05-22 13:26:32] ERROR: ZapisPojazdowMySQL/zapis_s.lua:37: attempt to call global 'mysql_fetch_assoc' (a nil value) But from my investigation I found out that mysql_fetch_assoc is old and no longer used. How do I replace it? Link to comment
ChaosMTA Posted May 23, 2016 Share Posted May 23, 2016 mysql_fetch_assoc is used in a deprecated MySQL Module. https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL You can either install it(don't recommend it as I stated it is deprecated and you are already using MTADB functions in this so..) or you can use dbPoll to return your results. https://wiki.multitheftauto.com/wiki/DbPoll 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