Commit 0fa3d1ac authored by Ted Trask's avatar Ted Trask

Revert mistaken change to not check existance of table

parent f444783b
...@@ -104,16 +104,15 @@ function mymodule.list_table_entries(dbase, self, clientdata) ...@@ -104,16 +104,15 @@ function mymodule.list_table_entries(dbase, self, clientdata)
local tables = db.listtables() local tables = db.listtables()
retval.value.table.errtxt = "Table does not exist" retval.value.table.errtxt = "Table does not exist"
retval.errtxt = "Table does not exist" retval.errtxt = "Table does not exist"
-- for i,t in ipairs(tables) do for i,t in ipairs(tables) do
-- if t == retval.value.table.value then if t == retval.value.table.value then
local t = retval.value.table.value
retval.value.table.errtxt = nil retval.value.table.errtxt = nil
retval.errtxt = nil retval.errtxt = nil
retval.value.fields.value = db.listcolumns(t) or {} retval.value.fields.value = db.listcolumns(t) or {}
retval.value.keyfields.value = db.listkeycolumns(t) or {} retval.value.keyfields.value = db.listkeycolumns(t) or {}
retval.value.entries.value = db.getselectresponse("SELECT * FROM "..db.escape(t)) or {} retval.value.entries.value = db.getselectresponse("SELECT * FROM "..db.escape(t)) or {}
-- end end
-- end end
if connected then db.databasedisconnect() end if connected then db.databasedisconnect() end
end) end)
if not res and err then if not res and err then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment