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.
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.
- [development] D6 Cleaning up on module uninstall jeff
- Re: [development] D6 Cleaning up on module uninstall John Fiala
- Re: [development] D6 Cleaning up on module uninstall Jamie Holly
- Re: [development] D6 Cleaning up on module uninstal... jeff
- Re: [development] D6 Cleaning up on module uninstall Dave Reid