sql - Why like operator doesn't work - Sqlite -


i have query return search base operation '%srch'

 srch=search.gettext().tostring(); ... db.rawquery("select  * mytable name 'srch%' or name '%srch' ",null); 

but doesn't work.

can explain why doesn't work, , how can fix ?

thanks lot

you can fix query changing below:

db.rawquery("select * mytable name ?",             new string[] { "%" + srch + "%" }); 

Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -