Case: We have one or more spammer-user who added hunderts/thousands of nodes automagicly or manually. It takes very long time to delete them using Drupal admin interface. We need a fast & effective solution.
The solution
1. Find 'uid' of spammer
2. Create a block with input-filter PHP and run following code
$r = db_query("select * from {node} where uid='123456789'");
while( $arr = db_fetch_array($r) ){
echo $counter++. " ". print_r($arr,1)."
";
echo node_delete( $arr[nid] );
}
?>