您现在的位置: 万盛学电脑网 >> 程序编程 >> 网络编程 >> asp编程 >> 正文

asp 无限级分类代码

作者:佚名    责任编辑:admin    更新时间:2022-06-22

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