I have a table called videos with a column named title and there is a set of words (around 50 words as of now but the number of words may increase) which is the knowledge base for filtering the content.
For example
porn, pornography, Adult, Boobs, Booty, Tits
pseudo query may be like
SELECT * FROM videos WHERE title NOT LIKE (porn, pornography, Adult, Boobs, Booty, Tits)
I checked NOT LIKE
but I have to do it like
SELECT * FROM videos WHERE title NOT LIKE ‘%porn%’ AND title NOT LIKE ‘%pornography%’ AND title NOT LIKE ‘%Adult%’ AND title NOT LIKE ‘%Booty%’ AND title NOT LIKE ‘%Boobs%’ AND title NOT LIKE ‘%Tits%’
which is very inconvenient and inefficient. So is there any other better way to do this ?
Best Answer
I've written this in SQL Server so you may have to translate to MySQL but this should work for you.