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 - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -