萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> asp編程 >> 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

copyright © 萬盛學電腦網 all rights reserved