sql="select top 8 * from album a,members b where a.member_id=b.member_id order by a.release_date desc"
'response.write sql
set rs=server.createobject("adodb.recordset")
rs.open sql,conn
i=1
while not rs.EOF
if i=1 then
response.write "<tr>"
end if
if rs("if_multi")="1" then
icon="multi.gif"
else
icon="single.gif"
end if
if rs("if_best")="1" then
icon_best="Icon_4.gif"
else
icon_best="Icon_2.gif"
end if
if (cstr(session("can_admin"))="1" or session("class_ID_admin")=rs("class_id")) and session("class_ID_admin")<>"" then
delStr="<a href=""javascript:if (confirm('是否删除该作品?')==true){MM_openBrWindow('del.asp?subject=album&topic_id="&rs("album_id")&"','Del');}"" >删</a>"
end if
%>
<td width="20%" valign="bottom" align="center">
<!--图片框-->
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><TABLE width=1 border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TD>
<TR>
<TD bgColor=#ffffff> <TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD onMouseOver="this.style.backgroundColor='#B8C5CD';return true;" onMouseOut="this.style.backgroundColor='#ffffff';">
<TABLE cellSpacing=0 cellPadding=2 width="100%"
border=0>
<TBODY>
<TR>
<TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=center><a href="album_detail.asp?album_id=<%=rs("album_id")%>"><img border="0" src="doc_img/album/<%=rs("mini_img")%>" ></a></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TABLE></td>
</tr>
</table>
<b><font color="#808080">
<a href="album_detail.asp?album_id=<%=rs("album_id")%>"> <%=rs("album_title")%></a></font></b><br>
<%=rs("nickname")%> <br>
<nobr><font class="en7pt" color="#666666"><img src="images/Icon_1.gif" align="absMiddle" width="19" height="16"><%=rs("click_count")%><img src="images/<%=icon_best%>" align="absMiddle" width="19" height="16"><%=rs("vote_count")%><img src="images/Icon_3.gif" align="absMiddle" width="19" height="16"><%=rs("reply_count")%>
</font><img src="images/<%=icon%>" align="absMiddle" width="19" height="16"> <%=delStr%></nobr>
<!--图片框--> </td>
<%
if i=4 then
response.write "</tr>"
i=0
end if
i=i+1
rs.movenext
Wend
if i<>1 then
for j=i to 4
%>
<td width="20%" valign="bottom" align="center">
</td>
<%
next
response.write "</tr>"
end if
rs.close
set rs=nothing
%>
</table>作者: 冰美人 时间: 2010-1-9 05:06
sql="select top 8 * from album a,members b where a.member_id=b.member_id order by a.release_date desc"
改成
sql="select top 8 * from album a,members b where a.member_id=b.member_id (and 单个分类的条件) order by a.release_date desc"作者: ylsdf 时间: 2010-1-9 05:06
楼主的分类id有限吗?根据不同的id来确定对应的分类,比如说假设你的分类id的字段名为id
sql="select top 8 * from album a,members b where a.member_id=b.member_id and id="&Request.QueryString("id")&" order by a.release_date desc"作者: `|楛纞♂ぺ﹖ 时间: 2010-1-9 05:06
我不知道要怎么改啊,怎么改都不行,