<!--#include file="conn.asp"-->
<%
dim selectm,selectkey,selectid
selectkey=trim(request.form(trim("selectkey")))
selectm=trim(request.form("selectm"))
if selectkey="" then
selectkey=request.form("selectkey")
end if
if selectm="" then
selectm=request.form("selectm")
end if
set rs=server.CreateObject("adodb.recordset")
select case selectm
case "minc"
rs.open "select * from product where mingc like '%"&selectkey&"%' order by id desc",conn,1,3
case "class"
rs.open "select * from product where daclass like '%"&selectkey&"%' order by id desc",conn,1,3
case "time"
rs.open "select * from product where time like '%"&selectkey&"%' order by id desc",conn,1,3
end select
if rs.eof then
response.write "还没有产品!"
end if
rs.pagesize=18 '******************设置每页显示文章数目***********************
if request("page")="" then
curpage=1
else
curpage=request("page")
end if
if not IsNumeric(curpage) then
response.Write("参数不对!")
response.end
end if
dim totalput
totalPut=rs.recordcount
if curpage<1 then
curpage=1
end if
if (curpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
curpage= totalPut \ MaxPerPage
else
curpage= totalPut \ MaxPerPage + 1
end if
end if
rs.absolutepage=curpage
%>
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录,行 48
错误代码 rs.absolutepage=curpage
參考答案:rs.open \"select * from product where daclass like \'%\"&selectkey&\"%\' order by id desc\",conn,1,3
case \"time\"
rs.open \"select * from product where time like \'%\"&selectkey&\"%\' order by id desc\",conn,1,3
end select
if rs.eof then
response.write \"还没有产品!\"
response.end \'在这里加这一句就可以了
end if
rs.pagesize=18 \'******************设置每页显示文章数目***********************
if request(\"page\")=\"\" then
curpage=1
else
curpage=request(\"page\")
end if