I am wondering if it is possible to remove duplicate text using a mysql query from one field, or if a problem like this would be better solved using PHP.
I have a database where users enter tags which can be searched upon. I have noticed that some tags have synonyms which I want to add to the field, but in some cases the synonym already exists, in other cases not. For example after I have updated the tags, I can end up with the following (the tags are separated by spaces only):-
- pool swimming pool ocean sea water
- swim ocean sea water water swim
- swimming pool swim swimming pool swim
Is there a way to eliminate duplicate text from the same field so I end up with this?
- pool swimming ocean sea water swim
- ocean sea water swim
- pool swim swimming