Find records according to a list of words
Accoring to a string that contain words separated from a space, in mySql i need to search all records in which the title contains at least one those words.
There are a specific syntax for do that, or i've to generate a WHERE IN (word1, word2, word3...) clause?
And there are a solution basend on the LIKE clause?
Searching on internet i found this solution too
is that the better?
WHERE interests REGEXP 'sports|pub'
Probably the best solution in terms of performance and functionality would be to set a FULLTEXT index on the column and use the related fulltext search functions.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)