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
Post a Comment