I have an array that contains some sting values that need to be matched in a similar fashion to or where. The array looks like this:
array('IS','KG','BO BB AF', 'MA')
When using a where clause I can match the 1st second and third values
SELECT * WHERE product_code LIKE 'IS'
but the 3rd value 'BO BB AF' needs to be matched like this
SELECT * WHERE product_code LIKE 'BO' or 'BB' or 'AF'
Is this possible to do with a single MySQL statement with a regular expression or will I have to break up the string and loop through it?
product_codecolumn isvarcharin type and you store values in comma separated form, Am I right?BO BB AFor only a part of it withproduct_code?