Current location: Hot Scripts Forums » Programming Languages » ASP » How to find the total number of subnodes in a tree structure?


How to find the total number of subnodes in a tree structure?

Reply
  #1 (permalink)  
Old 03-22-06, 04:23 AM
subhashparayil subhashparayil is offline
New Member
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How to find the total number of subnodes in a tree structure?

Hi friend,

I am in developing a MLM website using ASP for implementing this program, I need find the total number of sub nodes( left and right ) in a particular node. I attached the database structure and pictorial representation of nodes in database. Please check it.

I need the sql query that implementing the program.

1. Find the total number of subnodes of a particular node.
2. Find the total number of left handside nodes of a particular node.
2. Find the total number of right handside nodes of a particular node.

Please give me the idea.

warm regards
Subhash
Attached Images
File Type: gif databasestructure.gif (3.6 KB, 181 views)
File Type: jpg binarytree.jpg (14.6 KB, 180 views)
Reply With Quote
  #2 (permalink)  
Old 03-22-06, 09:29 AM
Christian's Avatar
Christian Christian is offline
Community VIP
 
Join Date: Mar 2005
Location: ProgrammingTalk
Posts: 2,449
Thanks: 0
Thanked 6 Times in 5 Posts
Thread moved to appropriate forum...
__________________
:: ImperialBB :: New version in the works! :: http://www.imperialbb.com ::

:: Have a question about the board? The Rules? An Infraction/Warning? :: Contact Form ::
Reply With Quote
  #3 (permalink)  
Old 03-22-06, 11:44 AM
koncept
Guest
 
Posts: n/a
just use select count(*) from table where field = 'some string' that should give you the numbers, unless i am misunderstanding what you want
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i get the total number of listed items in a for loop? nassau PHP 3 02-07-05 10:09 PM


All times are GMT -5. The time now is 03:42 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.