Created
July 20, 2016 07:47
-
-
Save aramboyajyan/6e75cf30c75f30ec79e088b226aa4d3b to your computer and use it in GitHub Desktop.
Drupal 7 delete all terms from a vocabulary programmatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$results = db_query("SELECT tid FROM {taxonomy_term_data} WHERE vid = :vid", array(':vid' => PLACE_HERE_VOCABULARY_ID))->fetchAll(); | |
foreach ($results as $result) { | |
taxonomy_term_delete($result->tid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment