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
results = WorldDBQuery( sql )
Query to execute.
- See method description.