<%
set rs=conn.execute("select top 4 * from product where pic1<>'' order by xh desc, id desc")------选出前四个有图片的产品记录,按照型号+ID排序
do while not rs.eof-----开始循环记录集
pic=rs("pic1") -----将图片地址赋到变量pic中
if yt=1 and rs("pics")<>"" then pic=rs("pics")-----如果yt=1并且pics字段不为空,则用pics的值替换pic变量
%>
-----输出图片,文字为产品名称,地址为pic变量中的内容
" title="<%=rs("title")%>" href="html/showproduct<%=rs("id")%>.html">------再写入一个文字链接,颜色用记录集中的颜色定义,title为产品名称,地址为html/showproduct_id.html,同上
<%=gotTopic(rs("title"),22)%>
set rs=conn.execute("select top 4 * from product where pic1<>'' order by xh desc, id desc")
从数据 PRODUCT表中取4条数据
do while not rs.eof
循环显示出来