Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite3, MATCH and OR

Tags:

sqlite

match

Is it valid to combine MATCH with OR?

For example,

SELECT * FROM myTable WHERE name MATCH 'andrew' OR name MATCH 'bill';

does not generate any hits, while both

SELECT * FROM myTable WHERE name MATCH 'andrew'; and

SELECT * FROM myTable WHERE name MATCH 'bill';

do give hits.

%%

Edit. The select with OR error code is 1, so it's malformed some how. The result on the second and third is 0 so they're fine. I'm not sure what's wrong.

like image 703
SK9 Avatar asked Jun 11 '11 04:06

SK9


1 Answers

http://www.sqlite.org/fts3.html#section_3

SELECT * FROM myTable WHERE name MATCH 'andrew OR bill'
like image 186
J-16 SDiZ Avatar answered Sep 21 '22 23:09

J-16 SDiZ