Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 18th, 2003, 04:46 PM
Adman's Avatar
Adman Adman is offline
PHP Programmer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 45 Adman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 7 sec
Reputation Power: 7
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

Reply With Quote
  #2  
Old December 18th, 2003, 07:42 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Dec 1999
Location: Afghanistan
Posts: 14,385 Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)Sepodati User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 72870 Folding Title: Intermediate FolderFolding Points: 72870 Folding Title: Intermediate FolderFolding Points: 72870 Folding Title: Intermediate FolderFolding Points: 72870 Folding Title: Intermediate Folder
Time spent in forums: 2 Months 4 Weeks 20 h 34 m 57 sec
Reputation Power: 1784
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
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...

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Modified Preorder Tree Traversal


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT