I have a string for example:
MatchString = "Renal and Dialysis Technologist and Technician"
I have a table that has a field called degree_name
As an example one of the degree names may be Dialysis Technician.
I want to try to find degrees that contain a number of the words from the MatchString above – maybe like 2 or 3 matches – is there an easy way to do this in mysql – if so what would the code look like?
Thanks!
You will be getting good results with a full text search in boolean mode. First make sure your table is MyISAM, with a full text index on
degree_name. Then this query will return matches, and number of words matching yourMatchString: