I have search items for eg '%ab', '%avcd%', %sr%', '%pple%' in my PHP variable.
I know LIKE is used in MySQL as:
Select * from tblName where fieldname like '%ab'
I have a long list of search conditions as mentioned earlier and I know that
Select * from tblName where fieldname like in ('%ab','%avcd%','%sr%','%pple%')
doesn’t work. What is the best way to resolve the problem?
1 Answer