Categories Disappearing

Author: an0n
Added: July 13, 2007

Ok, so you decided to use a dump .sql file to import your categories. Great!
You managed to save hours, even days if not weeks of hardwork and dedication to your directory.
(btw, i do not condone the use of categorical dumps of any kind whatsoever this)

If you did not use a dump file head on over here


The Problem:

Every time you add a new category another category is disappearing.

The problem lies within the mySQL Database and the PLD_CATEGORY_SEQ table.

What this able represents is the category ID of the next level to use based off of your PLD_CATEGORY table.


The example and explanation:


But what if the PLD_CATEGORY_SEQ file was NOT updated correctly when you imported the dump? Uh oh, BIG BIG problems!
It's ok though, I have an easy solution for you.


The solution:


UPDATE PLD_CATEGORY_SEQ SET ID = (SELECT `ID` FROM `PLD_CATEGORY` ORDER BY `ID` DESC LIMIT 1)+1


What does this do?



If any of this seems a bit too technical, you can always get a hold of me on the phpLD forums. I'm a Moderator and frequent between forums often. Here is a direct link to my profile(yes I'm the green guy)

I hope this helps at least one person out, because this has been a forever and never ending battle for almost a year now.

Regards to all,

Rob
DirectoryDump Web Directory