The infinite level member tree structure implemented by ASP

Source: Internet
Author: User
Tree-type Structure *********************************
' * Functions name: function Nodeuser (parent)
' * Function parameter: Parent
' * Parameter type: string
' * Return value type:--
' * Function function: Recursive display of user tree structure
' * Author: Fan Wei Shaw
' * Time: 2004-5-7
'*********************************
Function Nodeuser (parent)
' Retrieves its branches
sql = "SELECT name from [user] where sel= '" &parent& ""
Set rs = conn. Execute (SQL)
Do but not Rs. Eof
I=i+1
' Format control
For J=i to 2 step-1
Response. Write ("<font color=red> | </font> ")
Response. Write ("")
Next
Response. Write ("<font color=red> |-> </font>")
' Print out this user
Response. Write (RS (0))
Response. Write ("<br>")
' Recursive display of this user-rooted tree structure
Nodeuser (RS (0))
' And then turn to the next
Rs. MoveNext
Loop
' One level of display is completed and then indented
I=i-1
Rs.close
Set rs=nothing
End Function

Again use the time search for a while, did not find to achieve similar MLM kind of member tree, close-up a



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.