Insert snippet into a node's body. Select the php input format and submit the node.
I found it here: http://www.computerminds.co.uk/bulk-deleting-drupal-nodes-particular-con...
<?php
$node_type = 'page';
//fetch the nodes we want to delete
$result = db_query("SELECT nid FROM {node} WHERE type='%s'",$node_type);
while ($row = db_fetch_object($result)){
set_time_limit(20);
node_delete($row->nid);
$deleted_count+=1;
}
//simple debug message so we can see what had been deleted.
drupal_set_message("$deleted_count nodes have been deleted");
?>
Post new comment