diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-11-04 14:04:36 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-11-04 14:04:36 +0000 |
commit | 9c832d866c3afbc72e7340dc00cbd96976ce09b6 (patch) | |
tree | 571f8eac1792d6403729245989901c83913a7668 | |
parent | f9c547302d8adc55d3f5745f817caa7bb618ae4c (diff) | |
download | acf-kamailio-9c832d866c3afbc72e7340dc00cbd96976ce09b6.tar.bz2 acf-kamailio-9c832d866c3afbc72e7340dc00cbd96976ce09b6.tar.xz |
Changes to make users work with MYSQL
-rw-r--r-- | kamailio-model.lua | 6 |
1 files 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 |