I'm trying to implement a search function, and I came across this question. It worked brilliantly. If I search for, say 'go', I get any row that has that combination in it, whether it be 'gold', or 'bogo', or 'happygolucky'. But now, I want to implement something where I can type 'go the' in my search. With the above question, I can do that using '%go%the%', and it works. However, if the match for 'go' is in Name, and the match for 'the' is in Species, it still shows that result. I'd like to only get the result if the match is in the same column. My query looks like this:
select *
from tbl_fish
where concat(Name, Size, Color, Species, Description)
LIKE '%afr%vio%';
Is ther a way to go about this, short of some regex voodoo magic?