标题:做成像树型菜单一样的效果,不过我先要把数据库的数据按大小类循环出来
取消只看楼主
wuna421123
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-7-17
结帖率:0
已结贴  问题点数:20 回复次数:0 
做成像树型菜单一样的效果,不过我先要把数据库的数据按大小类循环出来
//读出大类传一个主键ID
  SQL="select consultingid,Consultingname,pid from Consulting where pid=1 order by consultingid asc"
  Call Data.Execute(SQL,RS,false)
  while not RS.eof
   ss=ss+""&RS("Consultingname")&""+","
   dim cid
   cid=RS("consultingid")
//Response.Write RS("Consultingname")
RS.movenext
wend
array=split(ss,",",-1,1)
  Response.write array(2)


//根据大类传ID读出小类?
SQL="select * from consulting where pid='"&cid&"' order by consultingid asc "
call data.Execute(SQL,RS,false)
while not RS.EOF
tt=tt+""&RS("Consultingname")&""+","
Response.Write" "
dim did
did=RS("consultingid")
dim array2
RS.movenext
wend
array2=split(tt,",",-1,1)
  Response.write array2(0)
//Response.Write "<br>"
Response.Write did
Response.Write"<br>"

//根据小类的ID找对应的问题
SQL="select a.consultingid,Consultingname,pid from consulting as a inner join  consultingmodule as b on a.consultingid=b.consultingid where a.consultingid='"&did&"' order by a.consultingid asc"
SQL="select * from consultingmodule where consultingid='"&did&"'"
call data.Execute(SQL,RS,false)
while not RS.EOF
cc=RS("Consultingtitle")
//zz=RS("consultingproblem")
consulting3=consutling3+""&cc&"</br>"
RS.movenext
wend
//for i=0 to ubound(array)
// Response.write array(j)
//Response.Write(consulting3)
%>
搜索更多相关主题的帖子: false 
2011-07-17 16:50



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-345691-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.162635 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved