那样写:

set rs=conn.execute("select * from Books")
while not rs.eof
rs2=conn.execute("select * from Authrs where AuthorID="&rs("AuthorID"))
Response.write rs("Title")&">>"&rs2("Name")
rs.movenext()
wend

 

这样写:

strSQL="SELECT Books.Title,Authors.Name FROM Books JOIN Authors ON Authors.AuthorID=Books.AuthorID"
set rs=conn.execute(strSQL)
while not rs.eof
Response.write rs("Title")&">>"&rs("Name")
rs.movenext()
wend

相关文章:

  • 2021-07-08
  • 2021-10-01
  • 2021-04-25
  • 2021-08-15
  • 2021-11-21
  • 2021-08-15
  • 2022-01-17
  • 2021-07-20
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2021-06-30
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案