当前位置:编程学习 > asp >>

asp 无限级分类代码

Function GetSonID(ParentID)
       G_sql = "Select * From select_Class Where ParentID = " & int(ParentID)
       Set Srs = Easp.db.GetRecordBySQL(G_sql)
       If Not Srs.Eof Then
       While Not Srs.eof
              GetSonID = GetSonID & ","  & Srs("ClassID") & "," & GetSonID(Srs("ClassID"))
       Srs.movenext
       Wend
       'GetSonID = ParentID & "," & GetSonID
       End IF
       Easp.db.C(Srs)
End Function

补充:asp教程,ASP入门
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,