• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 利用遞歸獲得無限分類的父類名稱getParentCategoryFullName

    發表于:2007-05-25來源:作者:點擊數: 標簽:
    tableName: ProductCategory CategoryID 自動編號 ParentCategoryID 數字 CategoryName 文本 CategoryID ParentCategoryID CategoryName 1 0 特色產品 2 0 軟件產品 3 0 產品代理 4 1 清防垢系列類 5 1 油氣井增產類 6 1 鉆井應用類 7 1 特殊行業應用類 % fu

    tableName:
        ProductCategory


    CategoryID   自動編號
    ParentCategoryID  數字
    CategoryName    文本







































    CategoryID ParentCategoryID CategoryName
    1 0 特色產品
    2 0 軟件產品
    3 0 產品代理
    4 1 清防垢系列類
    5 1 油氣井增產類
    6 1 鉆井應用類
    7 1 特殊行業應用類


     


    <%
    function getParentCategoryFullName(CategoryID,conn,FullName)
     if CategoryID=0 then
      getParentCategoryFullName="無父類"
      exit function
     end if
     Set rs1=Server.CreateObject("ADODB.Recordset")
     strSQL="SELECT CategoryName,ParentCategoryID FROM ProductCategory WHERE CategoryID=" & CategoryID
     rs1.Open strSQL,conn,1,1
     tmpID=rs1.fields(1).value
     tmpName=rs1.fields(0).value
     rs1.close
     set rs1=nothing
      if FullName<>"" then
       FullName= tmpName & "-" & FullName
      else
       FullName=tmpName
      end if
     if tmpID<>0 then
      FullName=getParentCategoryFullName(tmpID,conn,FullName)
     end if
     
     getParentCategoryFullName=FullName
    end function
    %>

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>