如何读取两个表!
好久没写程式了!代码都忘了~究竟要怎么写啊
sql="select * from A表 where Ax_ding=true order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof Then
response.write "暂无一级分类"
end if
do while not rs.eof
response.write "这是一级分类"
sql="select * from B表 where Ax_CID="&rs("ID")&" order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof Then
response.write "暂无暂无二级分类"
end if
do while not rs.eof
response.write "这是二级分类"
rs.movenext
loop
rs.close
set rs=Nothing
rs.movenext
loop
rs.close
set rs=Nothing
[ 本帖最后由 xing599666 于 2011-2-1 19:25 编辑 ]