<table width="380" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#ffffff">
<tr><td width="380" height="18" bgcolor="#ffffff"> 最新加入商品 </td> </tr>
<td width="380" valign="top" align="left" bgcolor="#ffffff">
<table border="0" width="380" cellspacing="0">
<tr>
<td width="380" valign="top" align="left" bgcolor="#ffffff">
<%sql="select top 20 * from hw WHERE HW_CASH>0 order by hw_id DESC"
rs.open sql,conn,3,3
if rs.eof then
response.write "暂无商品"
end if
do while not rs.eof%>
<a href="views.asp?hw_id=<%=rs("hw_id")%>"><%=rs("hw_name")%> </a>
<a href="contact.asp ?<%=rs("hw_id")%>> <img border="0" src="images/shop.gif"></a><br>
</TD>
</TR>
<%rs.movenext
loop
rs.close%>
</table>
</TD>
<tr>
<td width="380" height="18" align="left" bgcolor="#ffffff">商品分类</td>
</tr>
<table width="389" border="1" cellpadding="1" cellspacing="1" bordercolor="#ffffff">
<% sql="select * from sort"
rs.open sql,conn,3,3
if rs.eof then
response.write "没有分类"%>
<% end if
do while not rs.eof%>
<TR>
<td width="14%" height="18" valign="top" align="left" bgcolor="#ffffff"><strong><font color="#ff0000"><a href="sortinde.asp?sort_id=<%=rs("sort_id")%> &clbm=<%=rs("sort_name")%>"><%=rs("sort_name")%></a></strong>
</TD>
<%
dim rs1,sql1,clbm,cppm
sort_id=rs("sort_id")
clbm= rs("sort_name")
set rs1=server.createobject("adodb.recordset")
sql1="select * from sort1 where sort_id='"&sort_id&"' order by sortid "
rs1.open sql1,conn,3,3 %>
<td width="86%"bgcolor="#ffffff"></strong>
<% if rs1.eof then
response.write "暂无商品"
ELSE%>
<% do while not rs1.eof%>
<a href="sort.asp?sortid=<%=rs1("sortid")%> &sort_id=<%=rs1("sort_id")%> &clbm=<%=clbm%> &cppm=<%=rs1("sortname")%>"><%=rs1("sortname")%></a>
<%rs1.movenext%>
<% loop%>
</TD>
<%rs1.close
set rs1=nothing
%></tr>
<%end if%>
<%rs.movenext
loop
rs.close
set rs1=nothing
%>
</table>
</td>
</TD>
<td width="190" valign="top" align="left">
<table border="1" width="190" cellspacing="1" cellpadding="1">
<tr>
<td width="190"><!--#include file="right.asp"--></td>
</tr>
</table>
<td width="257"></td>
</table>
这是最新加入商品的一段代码,我想在加上上架的时间 怎么加谢谢大侠们
參考答案:首先你要在你的数据库里必须有上架时间 ,比如 sort_time
再在你要调用的地方调用就可以了.比如
<%=rs("sort_time")%>
在添加货物的表单你要加上一条上架时间的添加字段