11-26-2014, 06:12 AM
If so, use the ExecuteStatement() function instead, it's more high-level and provides the right interface that you need, the code I posted earlier will work with ExecuteStatement, if you add a middle parameter to it:
local theResult = {} DB:ExecuteStatement( "SELECT * FROM " .. PluginName .. " WHERE Player = ?", -- Note the use of placeholders for increased safety { playerName }, -- Placeholders will be replaced with values from this table function getResult(a_RowValues) -- This callback will be called for each retrieved DB row -- add the returned row to our result table: table.insert(theResult, a_RowValues) end ) return theResult