From 9c832d866c3afbc72e7340dc00cbd96976ce09b6 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 4 Nov 2014 14:04:36 +0000 Subject: Changes to make users work with MYSQL --- kamailio-model.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kamailio-model.lua b/kamailio-model.lua index 59aee83..84db859 100644 --- a/kamailio-model.lua +++ b/kamailio-model.lua @@ -168,8 +168,8 @@ function mymodule.list_files() end local function parse_db_show(table) - -- These settings work for Postgres and DBTEXT database - local delimiter = "\'?%s*[,|]%s*\'?" + -- These settings work for Postgres, MYSQL, and DBTEXT database + local delimiter = "\'?%s*[,|\t]%s*\'?" local results = {} local errtxt local f @@ -191,7 +191,7 @@ local function parse_db_show(table) results = {} else local words = format.string_to_table(line, delimiter) - if words and #words > 0 then + if words and #words > 0 and words[1] ~= "id" then results[#results+1] = words end end -- cgit v1.2.3