I am using a MySQL Database to search through a list of categories. My query is:
select * from cat where name REGEXP('(region_Long Island)+(.)*(sport_Outdoor Track)');
where the values "region_Long Island" and "sport_Outdoor Track" are passed in. I need to be able to match these categories, regardless of the order they are in. In the table, it is possible to have various combinations of these two categories. I need to match any records that have both of these categories, regardless of what order they are listed in.
I am not able to change the query itself, only modify what is passed into th REGEXP function.
Thank you