Help with search filtering query
Posted on 2011-03-06
I am looking for the best ways to do a search, but to also have keywords to exclude to really filter down results
Here is an example, I am looking for 'prince of persia', but I want to make sure that all the titles do not have any form of minifigure in it.
select * from products
where item_title like '%prince of persia%'
and item_title not like '%minifigure%'
or item_title not like '%minifig%'
or item_title not like '%mini-figure%'
Is there a better way to do this? This started bringing back results that didn't have 'prince of persia' at all!!