简体   繁体   中英

SELECT statement returns no results on iOS 8.2 (SQL 3.8.4)

The SELECT statement below worked perfectly fine on iOS 8.1 and prior versions. Now on my updated device with iOS 8.2 it simply returns no results without any error. I figured out that iOS 8.2 updated the SQLite version from 3.7.13 to 3.8.4. This seems to be the issue because I haven't changed anything else.

SELECT * FROM allLanguages WHERE allLanguages MATCH '*searchString*' (doesn't work --> no results)

As I played around a little it seems that the issue is the 'prefixed' wildcard *. Dropping this returns results.

SELECT * FROM allLanguages WHERE allLanguages MATCH 'searchString*' (works)

SELECT * FROM allLanguages WHERE allLanguages MATCH '*searchString' (doesn't work --> no results)

SELECT * FROM allLanguages WHERE allLanguages MATCH '*searchString*' (doesn't work --> no results)

Does anyone know whats the issue here? And can the SELECT statement may be substituted by a different one which works under SQL 3.8.4?

Many thanks in advance!

After some research putting double quotes around the '"*searchString*"' did the trick for me. Can't explain why but it works ;)

SELECT * FROM allLanguages WHERE allLanguages MATCH '"*searchString*"'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM