我正在尝试将此函数包含在websql查询中,例如
"select * from products where filter like '%pname%' order by soundex(filter);"但根据这一点:https://www.sqlite.org/lang_corefunc.html
Soundex函数只有在使用SQLITE_SOUNDEX参数编译sqlite时才可用,我认为这不适用于chrome,因为抛出
could not prepare statement (1 no such function: soundex)所以,我的问题是,有没有办法使用soundex函数,或者至少有一些其他类似的函数?
编辑1:现在我只是使用
order by coalesce(like('pname', filter), 0)这不是最终的解决方案,但比按特定列进行简单排序要好。
发布于 2015-09-03 00:05:42
WebSQL没有指定哪些SQL函数可用,也没有安装用户定义函数的机制。
https://stackoverflow.com/questions/32357430
复制相似问题