Webmastersite.net
Register Log In

Can I delete categories in PHPMyAdmin?
Having trouble with one category and its subcats

Comments on Can I delete categories in PHPMyAdmin?

midwestmedia


Usergroup: Customer
Joined: Apr 17, 2004

Total Topics: 21
Total Comments: 50
Posted Jul 20, 2006 - 4:31 PM:

Hi there,

I had posted about this before...basically, I have one sub-category that has taken it upon itself to turn into a top-level category (I don't know how this happened) and now I have several top-level categories that really should be second-level categories.

I deleted the "parent category"...Wedding Favors, and thought that after deleting orphans and aliases, all of those sub-cats would be gone too, but all that happened was that duplicates of the sub-cats I wanted to delete were created! smiling face ????

So, I was wondering if I can go into PHPMyAdmin and delete these there, or if that will mess things up? I can't delete them en masse using the Edit Categories feature because it keeps timing out, so I've been trying to delete them one by one.

Any help would be appreciated! I know this is weird!

Jen
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Jul 22, 2006 - 5:09 PM:

I can only speak from my own experience, but it worked fine for me. I've deleted tons of links and members manually.
You should just make sure to regenerate everything once you're done.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 23, 2006 - 8:01 AM:

You can. To delete all subcats of x you'd DELETE FROM wsnlinks_categories WHERE parent = x; and sub-sub etc would be WHERE parentids LIKE '%x%';

When doing anything through phpmyadmin the only effect is that totals are likely to be off until regeneration.
midwestmedia


Usergroup: Customer
Joined: Apr 17, 2004

Total Topics: 21
Total Comments: 50
Posted Jul 23, 2006 - 11:49 AM:

Thanks so much for the help! What a relief, I was worried I was going to have to do these manually one at a time!

Jen
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 23, 2006 - 2:54 PM:

Actually the latter part of what I said was very dangerous bad advice, and the issue with phpmyadmin deletions is that you can't undelete -- that's why I don't tend to suggest it. WHERE parentids LIKE '%x%'; would delete any category beneth a category that contains the number, meaning if x is 1 then stuff below category 11 and 21 would also get removed. WHERE parentids LIKE '%|x|%'; would be the correct instructions.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.