function Newstop2(SortPath)
  dim rs,sql,NewsName,NewFlag
  set rs = server.createobject("adodb.recordset")
  sql="select top 4 * from Qianbo_News where Instr(SortPath,'"&SortPath&"')>0 order by id desc"
  rs.open sql,conn,1,1
  if rs.eof then
      Response.Write " 暂无相关信息"&VbCrLf
  else
  rs.movenext
    do while not rs.eof  
   if now()-rs("AddTime")<=2 then
     NewsName=StrLeft(rs("NewsName"),20)  
     NewFlag=""
   else
     NewsName=StrLeft(rs("NewsName"),20)  
     NewFlag=""
   end If
  If ISHTML = 1 Then
   AutoLink = ""&NewName&""&Separated&""&rs("ID")&"."&HTMLName&""
  Else
   AutoLink = "NewsView.asp?ID="&rs("id")&""
  End If
  Response.Write "<li style=""height:20px"">&nbsp;<a href="""&AutoLink&""">"&NewsName&"</a></li>"
      rs.movenext
    loop
  end if
  rs.close
  set rs=nothing
end Function

 

注:rs.movenext     从当前位置向下移动一行

    rs.moveprevious 从当前位置向上移动一行

 

相关文章:

  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2021-11-27
  • 2021-06-20
  • 2021-05-21
  • 2022-12-23
  • 2021-10-23
猜你喜欢
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-08-15
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案