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

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -