Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Delete Large Categories

Quote Reply
Delete Large Categories
Hi,

I'm unable to use the admin to delete large categories and their subs as it keeps timing-out so the Monitor is now my option to delete them.

GT support cant help unless I pay them for the right mysql command, so I have managed to cobble together this command to use but need confirmation that it's correct...

DELETE FROM CatLinks WHERE CategoryID = 'idnumber';

Is that right?

Hopefully someone here can help else I'm completely stuck Frown

Thanks.

SamX.

Quote Reply
Re: Delete Large Categories In reply to
I don't know about this SQL-command (in fact, I don't know anything about sql... ;-) but I would install a copy of LinksSQL on my local system (yes, it runs on WinXX) and test it out. Use Mysqlman to up-/download the tables you need. Works pretty well. You can also delete the categories on your local system and then upload the new tables - since Mysqlman is very fast your server timeout should't be a problem.

Good luck

Andy

Quote Reply
Re: Delete Large Categories In reply to
You will also need to delete the Category from the Category Table...

Run the following SQL commands in the SQLMonitor:

1)

Code:

DELETE FROM CatLinks WHERE CategoryID = 'number';


2)

Code:

DELETE FROM Category WHERE CategoryID = 'number';


Then you will have to delete the CATEGORY folder in your links/pages folder....

Regards,

Eliot Lee
Quote Reply
Re: Delete Large Categories In reply to
Thanks a lot Eliot :)

SamX

Quote Reply
Re: Delete Large Categories In reply to
You're welcome...

Regards,

Eliot Lee
Quote Reply
Re: Delete Large Categories In reply to
Hi,

You should now run Repair Tables to delete any orphaned links you might have (links that are not in any category).

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Delete Large Categories In reply to
Ok, I got the categories deleted now I need to move lots of links from 1 category to another.
I search the forums but didn't see a way to do that from the monitor..

.. again any help very appreciated.

Thanks :)

Quote Reply
Re: [SamX] Delete Large Categories In reply to
Just tried the above to delete some large categories I have, however I'm not sure it completly worked. What I did was;

In SQL Monitor type;

Code:
DELETE FROM Links_CatLinks WHERE CategoryID = 'number';


Then;

Code:
DELETE FROM Links_Category WHERE ID = 'number';


Then I did a repair table, and it brought up a load of orphan links, which I deleted. However, the count now is completly wrong. Do I just need to run a SQL command again to update the number? If so, is this correct (I'm still a SQL newbie Wink);

SELECT FROM Links_Links COUNT(*)

Thanks

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: [AndyNewby] Delete Large Categories In reply to
Also, to delete multiple categories in one go, could I use something like;

DELETE FROM Links_CatLinks WHERE CategoryID = 29199,28626,12345;

or

DELETE FROM Links_CatLinks WHERE CategoryID = (29199,28626,12345);

As I said earlier, I'm still quite a newbie with the more advanced codes...just getting the hang of UPDATE, INSERT, MODIFY etc Wink

Thanks

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: [AndyNewby] Delete Large Categories In reply to
Anyone? Unsure

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: [AndyNewby] Delete Large Categories In reply to
*bump* Anyone?

Thanks

Andy
Quote Reply
Re: [AndyNewby] Delete Large Categories In reply to
You'd really need to do a "join" to get the category number/name for each link.

You'd have to be careful if a link is in more than 1 category, since there is only one copy of the link, but potentially several CatLink entries.

Probably easier and safer to write a short script that would do the selects, and keep track of the results.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Delete Large Categories In reply to
I decided it is wiser to give up Tongue. I tried downloading a dump to my computer, and doing it from there, but I only have 256Mb RAM and a crappy 28.8k connection Frown, so the download of the file alone took 3 hours. Oh well, I'll try again some other time.

Thanks

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!