Method Global:WorldDBQuery [-] [+]

Executes a SQL query on the world database and returns an ElunaQuery.

The query is always executed synchronously (i.e. execution halts until the query has finished and then results are returned).

local Q = WorldDBQuery("SELECT entry, name FROM creature_template LIMIT 10")
if Q then
    repeat
        local entry, name = Q:GetUInt32(0), Q:GetString(1)
        print(entry, name)
    until not Q:NextRow()
end

Synopsis

results = WorldDBQuery( sql )

Arguments

string sql

Query to execute.

Returns

ElunaQuery results
See method description.

Generated on
©2016 - Eluna Lua Engine