% page = "mbulletins/list.asp" set conn = server.createobject("ADODB.Connection") conn.open dsn if request("Mode") = 1 then sql = "select mb.id,mb.replyid,mb.subject,mb.date,mb.email from mbulletins mb " if request("keyword") <> "" then sql = sql & " and mb.subject like '%" & request("keyword") & "%'" end if if request("Author") <> "" then sql = sql & " and mb.email like '%" & request("Author") & "%'" end if if isdate(request("date")) then sql = sql & " and mb.date > '" & request("date") & "'" end if sql = sql & " order by mb.replyid desc, mb.id" else sql = "select mb.id,mb.replyid,mb.subject,mb.date,mb.email from mbulletins mb order by mb.replyid desc, mb.id" end if if not isnumeric(request("Page")) or request("Page") = "" then page = 1 else page = request("Page") SET RS = Server.CreateObject("ADODB.RecordSet") RS.cursorlocation = 3 RS.CacheSize = 100 RS.open SQL,Conn if not RS.EOF and not RS.BOF then RS.movefirst RS.pagesize= 100 RS.absolutepage = page pages = rs.pagecount end if set rs = conn.execute(sql) %>
Ask
a Pro
(a forum for hardware help)
Search Archive Add New Message