Jump to content

mysql problem


Nutella

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...