I have below code now.
I am getting list of strings from the UI as below. the list has 3 strings as shown below.
happy%
%hai
%hello%
now i am looping through all 3 strings and getting matching strings and adding them to final list as below.
for(int i=0;i<list.size;i++){
//query to perform like search...
}
My question is , instead of firing a separate query, how can i include them in a single query?
Thanks!
You can use
ORoperator with that three strings you are getting likewhere name like 'happy%' or name like '%appy' or name like '%ppy%'