If there are sub-menus, their menu_item_parent is set to the menu_item_id of the parent menu item. If I change the menu_item_status of a parent, I want the effect to cascade down through all the child menus, however many levels deep.
I tried doing this with a recursive function in PHP but the process would hang on me. I'd rather do it on the level of MYSQL if that's possible. Is there a MYSQL solution for this?
You might also consider using a nested set hierarchical structure for the data instead of the parent/child (adjacency list) structure.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks