oh please oh please, show yourself mighty brave soul. who will tackle such a magnificent goal?
i would love to live up to that title but MySQL and I have had some bad times together. even stylesheets fear my messin'.
mark, would throwing an extra column or two into the Lum_Catagories suffice as a core feature for this? Just to support a child-of-category and category number within that category. Not quite sure how this would role out as an extension.
SQL was not designed to traverse arbitrary tree structures; it leads to extremely inefficient queries.
I was thinking about how much work would be involved for a tag extension that wouldn't touch the category functionality. Initial research suggests "not much"; too bad I'm busy this weekend.
I don't think Tagging is really what he's looking for, but I could be wrong.
Lech, I'd go the simple route and add a "ParentCategoryID" to the Category table. That way you can go as deep as necessary - or not at all.
I was about to consider having a bash at this to see what i could make of it. Till i realised i'd have to handle blocking of categories and role permissions and stuff. Why are things never simple..
Lech, I'd go the simple route and add a "ParentCategoryID" to the Category table. That way you can go as deep as necessary - or not at all.
But there's no way to make sure that a category's parent doesn't already have a parent, so you end up having to query the table once for each record in the table, to test whether it has any children.
Now, the category table probably won't get very large, but O(n2) is nothing to scoff at, when a recursive solution would be linear.
Not to mention the nightmare you'd have if a *loop* found it's way into the table.
Yeah, bergamot, there are problems involved no question. But you'd just have to programmatically figure it out. I mean, all of this would be managed through an interface in the settings tab.
A pretty easy solution would be to add yet another field called "IsParent" to the category table. Then you'd only allow IsParent == 1 categories to have children, and no child can have IsParent == 1.
Ok, that method sounds better than storing it into its own column. It should provide enough freedom (i hope) the only madness to arise from it though is tracking/linking of the actual discussions then. Instead of storing it as a simple 1-2 digit ID number, would it then too be serialized ala (1,3) for parent cat 1 child cat 3?
Comments
Is anyone interested in taking it on?
I was thinking about how much work would be involved for a tag extension that wouldn't touch the category functionality. Initial research suggests "not much"; too bad I'm busy this weekend.
Now, the category table probably won't get very large, but O(n2) is nothing to scoff at, when a recursive solution would be linear.
Not to mention the nightmare you'd have if a *loop* found it's way into the table.