There was an error while loading. Please reload this page.
Given a term id, will delete all nodes which have that id. Can handle 750 nodes easily.
$tids = func_get_args(); $q = db_select('field_data_og_vocabulary', 'ov') ->fields('ov', array('entity_type', 'entity_id')) ->condition('og_vocabulary_target_id', $tids) ->execute(); $ids = array(); foreach ($q as $r) { $ids[$r->entity_type][] = $r->entity_id; } foreach ($ids as $type => $k) { drush_print('Deleting nodes of type '.$type); entity_delete_multiple($type, $k); }