Jetmen Revival downloads Forum Index
RegisterSearchFAQMemberlistUsergroupsGalleriesLog in
递归实现tree&#30

 
Reply to topic    Jetmen Revival downloads Forum Index » JETMEN ONLINE View previous topic
View next topic
递归实现tree&#30
Author Message
ghdhair100
Forum Master
Forum Master



Joined: 15 Dec 2010
Posts: 1972
Read: 0 topics

Location: England

Post 递归实现tree&#30
dim myrs
dim lev
lev=0
str="+"
sqlstr="select id,dept_name,lev from cpb_dept where len(lev)=len("& uplev &")+1 and left(lev,len("&uplev&"))="& uplev & " and dept_name not like '%测试%' and flag=true order by lev "
set rs=server.createobject("adodb.recordset")
rs.open sqlstr,conn,1,3
If rs.RecordCount > 0 Then
myrs=rs.GetRows()
rs.Close
Set rs = Nothing
recN=UBound(myrs,[link widoczny dla zalogowanych],2)
For i=0 To recN
if len(myrs(2,i))<>lev then
lev=len(myrs(2,i))
for ii=0 to lev
str=str & "--"
next
end if
'Response.Write("ID: "&myrs(0,i)&", First: "&myrs(1,[link widoczny dla zalogowanych],i)&", Second: "&myrs(2,i)&"<br />")
Response.Write(str & "<img str=images/nofollow.gif>"& myrs(1,i)&"<br />")
call tree(myrs(2,[link widoczny dla zalogowanych],i))
Next
else
rs.Close
Set rs = Nothing
Exit sub
end if
end sub
call tree("11")
sub tree(UPlev)
Many years ago there lived an Emperor who was so exceedingly fond of fine new clothes that he spent vast sums of money on dress. To him clothes meant more than anything else in the world. He took no interes
related links:


[link widoczny dla zalogowanych]


The post has been approved 0 times
Wed 4:35, 09 Mar 2011 View user's profile
Display posts from previous:    
Reply to topic    Jetmen Revival downloads Forum Index » JETMEN ONLINE All times are GMT + 2 Hours
Page 1 of 1

 
Jump to: 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.
Regulamin