ghdhair100
Cholerny Spammer
Joined: 15 Dec 2010
Posts: 1829
Read: 0 topics
Location: England
|
Posted: Fri 11:58, 11 Mar 2011 Post subject: 递归实现tree |
|
|
sub tree(UPlev)
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,[link widoczny dla zalogowanych],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,i)&",[link widoczny dla zalogowanych], Second: "&myrs(2,i)&"<br />")
Response.Write(str & "<img str=images/nofollow.gif>"& myrs(1,i)&"<br />")
call tree(myrs(2,i))
Next
else
rs.Close
Set rs = Nothing
Exit sub
end if
end sub
call tree("11")
The secondary purpose is to show you how much traffic 038; visibility your articles are attracting for you.Some questions for you:How would you like to see these email reports improved?What additional information should we include in them?Is monthly the right frequency to send them or would like them more or less frequently?Does this email service lead you to really write and submit more articles or not so much?Would you like to see total # of clicks delivered to your website?
[link widoczny dla zalogowanych]
The post has been approved 0 times
|
|