Jump to content

SQL: How to get all tables in database


Piorun

Recommended Posts

Another proble i have that i dont get any outputed message i dont know why:

local query = dbQuery ( database, "SELECT * FROM characters" ) 
    local result, num_affected_rows, errmsg = dbPoll ( query, -1 ) 
    for _, row in ipairs(result) do 
        for k, v in ipairs(row) do 
            outputChatBox(tostring(k)..", "..tostring(v)) 
        end 
    end 

I have "something" in this table (3 rows are - i checked it using program) but nothing happen. Why?

Link to comment
local query = dbQuery ( database, "SELECT * FROM characters" ) 
    local result, num_affected_rows, errmsg = dbPoll ( query, -1 ) 
    for _, row in ipairs(result) do 
        for k, v in pairs(row) do 
            outputChatBox(tostring(k)..", "..tostring(v)) 
        end 
    end 

Try that.

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...