First question on stackoverflow. I used this A more dynamic way of nesting multi-level categories for creating multilevel category table for my assignment.
I have childof field in category table for managing parent-child relationship. I am clear about fetching these categories based on childof. The root categories will have "childof = 0".
While adding a new category , I will represent a choose parent drop down of all categories in the form and user will choose one parent for this new category child (which is to be added).
I am confused about updating the categories : -
While updating a category , I am having two problems. a) I can not use current choosen category in the choose parent drop down as this will assign parent to itself. I mean same id can not have same childof id ?? what do you think ?
b) What about editing root categories ?? Editing their parent and moving them to other sub levels can cause problems ??
Any other way of doing this is most welcome.
please help