[development] D6 Cleaning up on module uninstall
jeff at ayendesigns.com
jeff at ayendesigns.com
Wed Jan 26 23:20:03 UTC 2011
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.
More information about the development
mailing list