<%
set rs=server.CreateObject("adodb.recordset")
i=0
rs.open "select top 10 id,discount,name from product order by discount asc",conn,1,1
if rs.eof and rs.bof then
response.write " 目前没有特价商品"
end if
if rs.recordcount>=3 then
rs.absoluteposition=3
do while not rs.eof
i=i+1
if len(trim(rs("name")))>14 then
response.write " ·"&left(trim(rs("name")),12)&"... "&rs("discount")*100&"% "
else
response.write " ·"&trim(rs("name"))&" "&rs("discount")*100&"% "
end if
if i>=10 then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
|