Trying to do this…I have a column type_style possible values would be 2 Story,Beach House or Contemporary,2 Story Im trying to use type_style as a search query, but values for the search would be 2 Story, Beach House, Contemporary. Each row could be a combination of any of the type_style’s. My original idea was to do
WHERE `type_style` LIKE '%contemporary%'
Which would work fine if the user could only select one style, the client wants to have the users be able to select more than one style, so how would I go about doing this? The database is updated nightly from the state MLS, so aside from assigning a FULLTEXT index or something I cant change the way the type_style column is setup, any ideas? Any way to combine the IN statement and a LIKE-style comparision? Im pretty sure I could do something like
WHERE
MATCH (`type_style`) AGAINST ('*2 story*' IN BOOLEAN MODE)
OR
MATCH(`type_style`) AGAINST ('*contemporary*' IN BOOLEAN MODE)
But this would stand to be a very large query as there are about 20 style types….any other way to do this????
have table with
type_styles:third table connecting:
record_is,style_idsearch on third table, so you can have multiple answers
if combine text ‘2 story, contemporary’ is needed use
CONCAT_GROUP