Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Deleting bulk categories in GLinks 3

Quote Reply
Deleting bulk categories in GLinks 3
Hi,

I need to delete a bunch of leaf categories with zero links in GLinks 3.

In Links SQL v2.x, this is done by calling the delete() function on the category object. It also takes care of the related catlinks records when deleting the category records.

In GLinks3, I don't know for sure as there is now a Category_tree table as well.

Does anyone know for sure that deleting categories like this will also clean up the Category_tree table and/or if the category tree needs to be rebuilt straight after ?

Thanks in advance.

Regards,
Peter Puglisi
www.ausfreedom.com
Ultimate Freedom is our game.

Last edited by:

rocco: Jun 29, 2005, 4:15 AM
Quote Reply
Re: [rocco] Deleting bulk categories in GLinks 3 In reply to
Hi,

$DB->table('Category')->delete( { ID => xx } ) should work fine. The attached plugin makes this automated (wouldn't be hard to put in .cgi script form, so it could be run via crontab, if needed).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Deleting bulk categories in GLinks 3 In reply to
Thanks very much Andy!

Regards,
Peter Puglisi
www.ausfreedom.com
Ultimate Freedom is our game.