asp数据排列问题

来源:百度知道 编辑:UC知道 时间:2024/07/02 16:55:28
<%
sql1="select top 6 user.*,marry_public.* from user,marry_public where marry_public.user_name=user.user_name"
set rs=server.CreateObject ("ADODB.recordset")
rs.Open sql1,conn,1,1
do while not rs.EOF
%>
<tr background="images/dotline1.gif">
<td width=15% height="26" background="images/dotline1.gif"> <img src="images/member_logo.gif" width="7" height="10"> <a href="members/show_user.asp?user_name=<%=rs("user_name")%>" target=_blank><%=rs("nickname")%></a></td>
<td width=5% height="26" align="center" background="images/dotline1.gif"><%=rs("sex")%></td>
<td width=5% height="26" align="center" background=&

sql1="select top 6 user.*,marry_public.* from user,marry_public where marry_public.user_name=user.user_name order by id desc"

除了order desc外

recordset支持把游标直接移动到尾(这个查下手册)

然后

do while not rs.BOF
...
rs.MovePrevious
while