ASP如何在当前页面实现回覆,如何传id
<%setrs=server.createobject("adodb.recordset")sql="selecttop1*fromliuyanwherepublish=...
<%
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from liuyan where publish='楼市政策' order by addtime desc"
rs.open sql,conn,1,3
%>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="56%" height="25" align="left" bgcolor="#FBFDFF" class="l16"> <b>
楼市政策</b></td>
<td width="18%" align="left" bgcolor="#FBFDFF" class="l16">网友:
<%=rs("username")%></td>
<td width="26%" align="left" bgcolor="#FBFDFF" class="l16"><%= FormatDateTime(rs("addtime"),2) %></td>
</tr>
</tbody>
</table>
这个是问题,下边是回覆
<%
set rs2 = server.CreateObject("adodb.recordset")
sql="select top 1 * from comment where com_typeid="&id&" order by com_date desc"
rs2.open sql,conn,1,3
if rs2.bof and rs2.eof then
%>
<table cellspacing="2" cellpadding="6" width="100%" border="0">
<tbody>
<tr>
<td width="40" align="center"><img height="27" src="images/H16.jpg" width="31" /></td>
<td align="left" style="word-break:break-all;"><font color=#0033CC><%=rs2("com_content")%></font></td>
</tr>
</tbody>
</table>
<%end if%>
select top 1 * from comment where com_typeid="&id&" order by com_date desc,"&id&"接不住 展开
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from liuyan where publish='楼市政策' order by addtime desc"
rs.open sql,conn,1,3
%>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="56%" height="25" align="left" bgcolor="#FBFDFF" class="l16"> <b>
楼市政策</b></td>
<td width="18%" align="left" bgcolor="#FBFDFF" class="l16">网友:
<%=rs("username")%></td>
<td width="26%" align="left" bgcolor="#FBFDFF" class="l16"><%= FormatDateTime(rs("addtime"),2) %></td>
</tr>
</tbody>
</table>
这个是问题,下边是回覆
<%
set rs2 = server.CreateObject("adodb.recordset")
sql="select top 1 * from comment where com_typeid="&id&" order by com_date desc"
rs2.open sql,conn,1,3
if rs2.bof and rs2.eof then
%>
<table cellspacing="2" cellpadding="6" width="100%" border="0">
<tbody>
<tr>
<td width="40" align="center"><img height="27" src="images/H16.jpg" width="31" /></td>
<td align="left" style="word-break:break-all;"><font color=#0033CC><%=rs2("com_content")%></font></td>
</tr>
</tbody>
</table>
<%end if%>
select top 1 * from comment where com_typeid="&id&" order by com_date desc,"&id&"接不住 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询