diff options
-rw-r--r-- | kamailio-model.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kamailio-model.lua b/kamailio-model.lua index 4158963..797aaaa 100644 --- a/kamailio-model.lua +++ b/kamailio-model.lua @@ -393,7 +393,7 @@ function get_table_entry(table, id) retval[f] = cfe({ label=f, seq=i }) end if id and id ~= "" then - local entry = getselectresponse("SELECT * FROM "..escape(clientdata.table).." WHERE id='"..escape(clientdata.id).."'") + local entry = getselectresponse("SELECT * FROM "..escape(table).." WHERE id='"..escape(id).."'") if entry and #entry > 0 then for n,v in pairs(entry[1]) do if retval[n] then retval[n].value = v end @@ -505,7 +505,7 @@ function delete_table_entry(table, id) end end if not errtxt then - local sql = "DELETE FROM "..escape(entry.value.table.value).." WHERE id='"..escape(entry.value.id.value).."'" + local sql = "DELETE FROM "..escape(table).." WHERE id='"..escape(id).."'" runsqlcommand(sql) result = "Entry Deleted" end |