sql="select * from type2" rs.open sql,conn,1,1 while not rs.eof a=rs("id2") b=rs("p_type2") call top2(a,a) rs.movenext wend rs.close end sub
sub top11
sql="select * from type2" rs.open sql,conn,1,1 while not rs.eof response.write (rs("p_type2")&"|||") rs.movenext wend rs.close end sub sub top2 (id,b) sqle="select DISTINCT(author) from product where id2="&id set rsa=server.CreateObject("adodb.recordset") rsa.open sqle,conn,1,1 if not(rsa.eof) then while not rsa.eof response.write (b&"###") response.write rsa("author")&"|||" rsa.movenext wend else response.write (b&"###") response.write "无"&"|||" end if rsa.close end sub