【发布时间】:2015-09-02 15:38:27
【问题描述】:
我正在尝试将此函数包含在 websql 查询中,例如
"select * from products where filter like '%pname%' order by soundex(filter);"
但据此:https://www.sqlite.org/lang_corefunc.html
只有在使用 SQLITE_SOUNDEX 参数编译 sqlite 时,Soundex 函数才可用,我不认为 chrome 是这样的情况
could not prepare statement (1 no such function: soundex)
所以,我的问题是,有没有办法使用 soundex 函数,或者至少是其他一些类似的函数?
编辑 1: 现在我只是在使用
order by coalesce(like('pname', filter), 0)
这不是最终的解决方案,但比按特定列的简单排序要好。
【问题讨论】:
标签: sqlite google-chrome chromium web-sql