27 Jan
2011
27 Jan
'11
12:20 a.m.
Ah, good point, thanks. I don't think the node count will be an issue, but the total number of files to be deleted could be.
Jamie Holly wrote:
$result = db_query("SELECT nid FROM {node} where type='{whatever my custom type is}'"); while ($row=db_fetch_object($result)){ node_delete($row->nid); }
If your talking about images through imagefield, then that will delete the files also.
One thing to note: Depending on how many nodes you have, this can choke. It is generally best to do bulk deletes like this through the batch api in batches of 50 or so.