sqlite - Android database useing multiple like statements -
i making search function , need search using 2 inputs:
the category id (cid) string contained (or not) in key_p_cat_list (it cant done = isn't equal)
the search text input (input)
i need check if category , input text contained in db record , return in cursor if so.
coloane correctly defined [] string , not problem.
my atempt:
db.query(true, p_table, coloane,key_p_cat_list + " " + " , " +cid + " like", new string[] {"%"+cid+"%", "%"+input+"%"}, null, null, null, null);
try this:
db.query(true, p_table, coloane,key_p_cat_list + " ?" + " , " +cid + " ?", new string[] {"%"+cid+"%", "%"+input+"%"}, null, null, null, null); hope helps!!
Comments
Post a Comment