固液沉降罐工作原理:ASP代码翻译 这是一个留言本的ASP源代码 它每次全部显示留言信息 如果我只想显示10条怎么改啊
来源:百度文库 编辑:神马品牌网 时间:2024/08/28 10:41:59
<%
set rs=server.createobject("adodb.recordset")
sql="select user,qq,email,content,data from main order by id desc"
rs.open sql,conn,1,1
%>
<%do while not rs.eof%>
<html>
<head>
<title>延续留言本-首页</title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><TABLE id=Table40 cellSpacing=1 cellPadding=3 width=450
bgColor=#c6d7c6 border=0>
<TBODY>
<TR>
<TD colspan="2" bgColor=#f5faf5><TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD width="88%"><P s="MARGIN-TOP: 3px; MARGIN-LEFT: 10px"><span class="text1" s="font-weight: bold"><%=rs("user")%></span> 留言于 <%=rs("data")%></P></TD>
<TD width="12%" align=right><a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs("qq")%>" target="_blank">QQ</a> <a href="mailto:<%=rs("email")%>">邮件</a></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD width=50 bgColor=white><P class="text2" s="MARGIN-TOP: 3px; MARGIN-LEFT: 10px">内容:</p></TD>
<TD width=385 bgColor=white><P s="MARGIN-TOP: 3px; MARGIN-LEFT: 10px"><%=rs("content")%></p></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table>
<%
rs.movenext
loop
%>
set rs=server.createobject("adodb.recordset")
sql="select user,qq,email,content,data from main order by id desc"
rs.open sql,conn,1,1
%>
<%do while not rs.eof%>
<html>
<head>
<title>延续留言本-首页</title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><TABLE id=Table40 cellSpacing=1 cellPadding=3 width=450
bgColor=#c6d7c6 border=0>
<TBODY>
<TR>
<TD colspan="2" bgColor=#f5faf5><TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD width="88%"><P s="MARGIN-TOP: 3px; MARGIN-LEFT: 10px"><span class="text1" s="font-weight: bold"><%=rs("user")%></span> 留言于 <%=rs("data")%></P></TD>
<TD width="12%" align=right><a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs("qq")%>" target="_blank">QQ</a> <a href="mailto:<%=rs("email")%>">邮件</a></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD width=50 bgColor=white><P class="text2" s="MARGIN-TOP: 3px; MARGIN-LEFT: 10px">内容:</p></TD>
<TD width=385 bgColor=white><P s="MARGIN-TOP: 3px; MARGIN-LEFT: 10px"><%=rs("content")%></p></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table>
<%
rs.movenext
loop
%>
sql="select user,qq,email,content,data from main order by id desc"
改成 sql="select top 10 user,qq,email,content,data from main order by id desc"
sql="select top 10 user,qq,email,content,data from main order by id desc"