|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Modified Preorder Tree Traversal
Hi understand how this method works, but I don't understand how I would add/edit/delete content. How can I delete a node?
Lets say I want to edit a node. In the form I have a drop downlist of all the current nodes in the tree, how can I select one of those nodes and related it to the edited nodes? When I add a node, how do i know what left and right values to insert?
__________________
//Adman |
|
#2
|
||||
|
||||
|
When you delete a node, you need to subtract from all of the nodes greater than it (based upon how many subnodes were deleted).
I don't understand what you're asking about editing a node. When you add a node, you have to choose a node to place it next to, right? So the "left" value is just one more than that, "right" value is one more than "left" and you add two to every node that's greater than the "right" node number... Moving this to General DB Discussion, as it's not related to PHP. ![]() ---John Holmes... |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Modified Preorder Tree Traversal |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|