(Tips) Delete Unused Taxonomy Terms From A Free Tagging Vocabulary
Tips : Delete Unused Taxonomy Terms From A Free Tagging Vocabulary
Description:
Wish taxonomy terms would get deleted when a node is deleted, if they aren't used by any other content?
Agaric brings you the next best thing.
@TODO ben-agaric: turn this into a module
Basically we want to delete any term that doesn't exist in the term_node table, though it would be nice to do this by vocabulary (as in, nice not to accidentally delete your carefully set up non-free tagging vocabulary)
SQL to do this (with Drupal table prefix enabling brackets and using aliases, which (in MySQL) can only be defined after the word using and, if defined, must be used in the DELETE FROM part of the phrase)
Courtesy : Agaricdesign.com
- guru's blog
- Login to post comments
![Drupal-6-Book-[Building Powerful and Robust Websites with Drupal 6].jpg](http://www.drupalranch.com/images/Drupal-6-Book-[Building%20Powerful%20and%20Robust%20Websites%20with%20Drupal%206].jpg)