function HexSQL:GetData(target,id,columnnames,value) local query = "SELECT * FROM " .. target .. " WHERE " .. id .. "='" .. value .. "'" local cur = assert (con:execute(query)) local row = cur:fetch ({}, "a") if row == nil then _Msg("HexSQL: No matching rows found.\n") else local results = {} local i = 0 while row do i = i + 1 for k, v in ipairs(row) do _Msg(i .. "\n") local row.columnnames[i] = results[i] end row = cur:fetch (row, "a") end return results end end