asp数据库可不可以嵌套

来源:百度知道 编辑:UC知道 时间:2024/07/03 04:26:47
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sql="select * from [luntan]"
rs.Open sql,conn,1,1
%>
<%
if rs.EOF and rs.BOF then
response.write ("<br>"&"暂时还没有交流!")
else
end if
Do Until rs.EOF
response.Write("<br>")%><font face="wingdings">v</font>  <%
response.write("<strong>"&rs("l_title")&"</strong>"&"<br></br>"&"    ")%><pre><%response.Write("  "&rs("l_neirong"))%></pre>
<%response.Write("<br>"&"发表人:"&rs("l_username")&"   时间:"&rs("l_time")&"   ")
response.write"<a href=hufu.asp?id="&rs("l_id")&">"

看看sql的教程吧
用join连接多个表,只要一条sql语句就可以实现你想要的了

select * from luntan a left join hf b on 连接条件

为什么要把原文和回复内容分开啊?觉得没有必要呢