Reputation: 11
I have an sqlite database in android app and I want to search in (zan) table between 1-100 range in (id) column then withing that range find words similar in (eng) column, but it does not return anything and it does not give error either, thanks.
"Select * from zan where id (between 1 and 100) and eng like '"+smilarkeyword+"&'"
Upvotes: 0
Views: 1010
Reputation: 133360
Should be id between and the wildchar for like is % (or _)
"Select * from zan
where id between 1 and 100
and eng like '%"+smilarkeyword+"%'"
where % stands for 0 or more characters and _ stands for exactly one character
Upvotes: 2