I have a SQL table that contains spam or naughty word phrases. I'm trying to decide how to take some text and determine if any of the values in the table exist in my text.
In the past I have selected all of the phrases out of the database and looped over them, comparing looking to see if any phrase is in my passed text. Is this the best way? Is there a better way?