<%
dy1="巨川新闻"
dy2="酒店新闻"
dy3="折扣优惠"
dim tempstr
num=0
dim rs
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from news where BigClassName='"&dy1&"' and SmallClassName='"&dy2&"' order by id desc"
rs.Open sql,conn,1,1
if rs.eof<>true and rs.bof<>true then
while num<6 and rs.eof<>true
num=num+1
tempstr=""
if len(RS("title"))>11 then
tempstr=left(RS("title"),11)&"……"
else
tempstr=RS("title")
end if
%>
|
<%
rs.movenext
wend
end if
rs.close
%>