高手帮我看看这段产品显示代码如何改++++++分

来源:百度知道 编辑:UC知道 时间:2024/06/15 17:16:40
<%
dim HciCounts
HciCounts=0
'dim ProShowiCount
' ProShowiCount = 3 '每行显示产品数量,后面用来回车用的(已经增加到数据里了)
'fenlei_num = 12
pages=fenlei_num
rsprod.pagesize=fenlei_num
allPages = rsprod.pageCount '总页数
If not isNumeric(page) then page=1
if isEmpty(page) or clng(page) < 1 then
page = 1
elseif clng(page) >= allPages then
page = allPages
end if
rsprod.AbsolutePage=page
%>
<table width="100%" height="222" border="0" align="center" cellpadding="0" cellspacing="0">
<table width="98%" border="0">
<tr>
<%Do While Not rsprod.eof and pages>0
if (HciCounts mod ProShowiCount)=0 and HciCounts> 0 then
'Response.Write "</tr><tr><td><table width=25% border=1 cellpadding=0 cellspacin

你的ProdId 字段是自增型的吗?数据库里有添加时间吗?

把你的SQL语句的最后加上一
Order by prodId(或是你的时间字段) DESC

这个DESC就是按倒序排列,就是新加的在前面。
ASC是正序排列。