跪求大神帮我解释一下以下asp连数据库判断的代码
FunctionWebContent()DimidCountDimpagespages=MessageInfoDimpagecDimpagepage=CLng(reque...
Function WebContent()
Dim idCount
Dim pages
pages = MessageInfo
Dim pagec
Dim page
page = CLng(request("Page"))
Dim pagenc
pagenc = 5
Dim pagenmax
Dim pagenmin
Dim pageprevious
Dim pagenext
Dim datafrom
datafrom = "Zanmende_Message "
Dim datawhere
datawhere = "where ViewFlag "
Dim sqlid
Dim Myself, PATH_INFO, QUERY_STRING
PATH_INFO = request.servervariables("PATH_INFO")
QUERY_STRING = request.ServerVariables("QUERY_STRING")'
If QUERY_STRING = "" Then
Myself = PATH_INFO & "?"
ElseIf InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") = 0 Then
Myself = PATH_INFO & "?" & QUERY_STRING & "&"
Else
Myself = Left(PATH_INFO & "?" & QUERY_STRING, InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") -1)
End If 展开
Dim idCount
Dim pages
pages = MessageInfo
Dim pagec
Dim page
page = CLng(request("Page"))
Dim pagenc
pagenc = 5
Dim pagenmax
Dim pagenmin
Dim pageprevious
Dim pagenext
Dim datafrom
datafrom = "Zanmende_Message "
Dim datawhere
datawhere = "where ViewFlag "
Dim sqlid
Dim Myself, PATH_INFO, QUERY_STRING
PATH_INFO = request.servervariables("PATH_INFO")
QUERY_STRING = request.ServerVariables("QUERY_STRING")'
If QUERY_STRING = "" Then
Myself = PATH_INFO & "?"
ElseIf InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") = 0 Then
Myself = PATH_INFO & "?" & QUERY_STRING & "&"
Else
Myself = Left(PATH_INFO & "?" & QUERY_STRING, InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") -1)
End If 展开
1个回答
展开全部
Function WebContent()
Dim idCount
Dim pages
pages = MessageInfo '取总页数
Dim pagec
Dim page
page = CLng(request("Page")) '取一页记录数
pagenc = 5
Dim pagenmax
Dim pagenmin
Dim pageprevious
Dim pagenext
Dim datafrom
datafrom = "Zanmende_Message " '取表名
Dim datawhere
datawhere = "where ViewFlag " '组sql语句
Dim sqlid
Dim Myself, PATH_INFO, QUERY_STRING
PATH_INFO = request.ServerVariables("PATH_INFO") '取路径
QUERY_STRING = request.ServerVariables("QUERY_STRING") '取查询串
If QUERY_STRING = "" Then
Myself = PATH_INFO & "?"
ElseIf InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") = 0 Then '路径与查询串不含"page"串
Myself = PATH_INFO & "?" & QUERY_STRING & "&"
Else
Myself = Left(PATH_INFO & "?" & QUERY_STRING, InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") - 1) '取page串前的所有字符
End If
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询