ASP相关~高手帮帮~2

来源:百度知道 编辑:UC知道 时间:2024/07/06 21:44:45
dim totalPut
dim Num
dim strFileName,currentPage,MaxPerPage
strFileName="MyFile.asp?"
MaxPerPage=10
if request("page")<>"" then
currentPage=clng(request("page"))
else
currentPage=1
end if
If Not IsObject(Conn) Then ConnectionDatabase()
Set rs= Server.CreateObject("ADODB.Recordset")
sql="Select * from Files where (UserName='"&Session("UserName")&"' or instr(','+GroupID+',',0)>0 or instr(','+GroupID+',',"&Session("GroupID")&")>0 or instr(','+Lcase(ToUserName)+',','"&Lcase(Session("UserName"))&"')>0) and (instr(','+DelUserName+',','"&Session("UserName")&"')=0 or isnull(DelUserName)) order by id desc

大概的都解释了,其他的我想只要你认真看,肯定能看的懂
<%
dim totalPut
dim Num
dim strFileName,currentPage,MaxPerPage
strFileName="MyFile.asp?"
MaxPerPage=10
if request("page")<>"" then
currentPage=clng(request("page")) '转化成长整型
else
currentPage=1
end if
If Not IsObject(Conn) Then ConnectionDatabase() '判断数据库是否连接
Set rs= Server.CreateObject("ADODB.Recordset")
sql="Select * from Files where (UserName='"&Session("UserName")&"' or instr(','+GroupID+',',0)>0 or instr(','+GroupID+',',"&Session("GroupID")&")>0 or instr(','+Lcase(ToUserName)+',','"&Lcase(Session("UserName"))&"')>0) and (instr(','+DelUserName+',','"&Session("UserName")&"')=0 or isnull(DelUserName)) order by id desc "