标题: asp 用存储过程实现数据分页(三)
暖月
管理员
Rank: 9


UID 1
精华 230
积分 43474
帖子 8905
威望 38
金币 13177
热心 10777
阅读权限 102
注册 2005-7-26
状态 离线
asp 用存储过程实现数据分页(三)

 四、search_koushi.asp

<!-- #include file="conn.asp" -->
<%
line=6
if request("page")="" then
page=1
else
page=request("page")
end if


if page<1 then
page=1
end if


title=trim(request("title"))
list2_id=trim(request("list2_id"))
set rs2=conn.execute("sp_c 'tiku_koushi','"&title&"','"&list2_id&"'")
pagecount=CInt(rs2(0)\line)
if(CInt(rs2(0)) mod line)=0 then
pagecount=pagecount
else
pagecount=pagecount+1
end if


if CInt(page)>=pagecount then
page=CInt(pagecount)
end if
str=""
str=str&"page="&page&"&title="&title&"&list2_id="&list2_id
set rs=conn.execute

("sp_search_tiku 'tiku_koushi','"&title&"','"&list2_id&"','"&line&"','"&CInt(page)&"'")
if rs.eof then
response.write "no record"

网友 暖月 签名 - 网友社区 稷思天下有饥者,由己饥之也;
禹思天下有溺者,由己溺之也;
顶部
[广告] 免费域名(Free Subdomain) 免费空间(Free hosting) PR查询(Google Pagerank)



当前时区 GMT+8, 现在时间是 2008-10-16 06:15
信产部ICP备案:京ICP备05066424号 北京市公安局网监备案:1101050648号

Powered by Discuz! 5.5.0
清除 Cookies - 联系我们 - 网友俱乐部 - Archiver - WAP