Since Joomla does not have a tag merging feature, I'm looking for a way to merge existing tags using SQL query in phpmyadmin.
- Old tag_id=1
- New tag_id=2
This query works as long as all of the articles that have the tag_id=1 don't have also the tag tag_id=2.
Update xxx_contentitem_tag_map SET tag_id=2 WHERE tag_id=1
But it doesnt work when one of the article also have the tag_id=2. So I'm looking for a smart query that would work only on that selection:
SELECT * FROM xxx_contentitem_tag_map WHERE tag_id=1 AND tag_id!=2
How should I merge this SELECT query with the update query?