%
'-------------------------------------------
dim sql
dim rs '实例
dim totalPut '总记录数
dim CurrentPage '当前页
dim TotalPages '总页数
dim i,j
dim errmsg
founderr=false
state="新闻浏览"
havajava=1
subid=trim(request("subid"))
call nav()
Set rs= Server.CreateObject ("ADODB.RecordSet")
sql = "select * from news where subtype="&(subid)& " order by addtime desc"
'response.write (sql)
'response.end
rs.open sql, conn,1,3
'----------------------------------
'----------------------------------空记录
if rs.bof then
errmsg=errmsg+" "+"
还没有记录,请返回!!"
founderr=true
call error()
response.end
end if
rs.MoveFirst '到第一条记录
rs.pagesize=MaxPerPage '定义每页记录数
'howmanyfields=rs.Fields.Count-1
If trim(Request("Page"))<>"" then
CurrentPage= CLng(request("Page"))
If CurrentPage> rs.PageCount then
CurrentPage = rs.PageCount
End If
Else
CurrentPage= 1
End If
totalPut=rs.recordcount 'totalput=总记录数
if CurrentPage<>1 then
if (currentPage-1)*MaxPerPage < totalPut then
rs.move(currentPage-1)*MaxPerPage
end if
end if
%>
河津市人民医院