| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1143 人关注过本帖
标题:[求助]查找分页……
只看楼主 加入收藏
hai20041004
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-3-14
收藏
 问题点数:0 回复次数:21 
[求助]查找分页……

程序如下:功能是先实现自动排序分页(这部分没问题),然后是根据查找条件分页,现在出现的问题是可以根据条件查找出来并分页,但是只能显示第一页,如果再点击跳转到满足条件的第N页时,就会显示不出来,是显示是的功能一自动排序的分页……………谢谢


<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #include file="conn.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<style type="text/css">
<!--
body,td,th {
color: #0000FF;
}
body {
margin-left: 10px;
margin-top: 20px;
margin-right: 10px;
margin-bottom: 20px;
}
.t1 {
color: #FF0000;
}
.t2 {
font-weight: normal;
color: #FF0000;
font-size: 12px;
background-color: #CCCCCC;
}
a {
font-size: 15px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
color: #FF0000;
}
a:active {
text-decoration: none;
color: #99FF33;
}
.style4 {
font-size: x-large;
color: #FF0000;
font-weight: bold;
font-style: italic;
}
.style7 {font-size: 12px}
-->
</style>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>影视载吧</title>
</head>

<html>
<body oncontextmenu="return false">
<%
dim rst
set rst=server.CreateObject("adodb.recordset")
rst.open "select * from inym",conn,1,1
if rst.eof and rst.bof then
response.write"网站维护中……,请稍候继续关注!!"
rst.close
set rst=nothing
conn.close
set conn=nothing
response.End()
else
rst.close
rst.open "select * from inym",conn,1,1
%>
<table width="998" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="998" height="60" valign="top"><table width="100%" height="0" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="998" height="60" align="center" valign="middle"><%=rst("i_cdl")%></td>
</tr>
</table></td>
</tr>
<tr>
<td width="998" height="100" valign="top"><table width="100%" height="0" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="215" height="117" align="center" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="215" height="117" align="center" valign="middle"><a href="http://www.ysz8.cn"><img src="<%=rst("i_logol")%>" height="100" width="215"></a></td>
</tr>
</table></td>
<td width="783" height="117" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="783" height="50" valign="top"><table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="350" height="50" align="center" valign="middle" nowrap>
<form name="form1" method="post" action="index.asp?act=sos">
影视名称:
<input name="so" type="text" id="so2" size="15">
<select name="stype" id="stype">
<option>全部</option>
<option>动作片</option>
<option>爱情片</option>
<option>喜剧片</option>
<option>恐怖片</option>
<option>战争片</option>
<option>科幻片</option>
<option>动漫片</option>
<option>娱乐片</option>
<option>剧情片</option>
<option>电视剧</option>
</select>
<input type="submit" name="Submit" value="搜索">
</form>
</td>
<td width="433" height="50" align="center" valign="middle" nowrap></td>
</tr>
</table></td>
</tr>
<tr>
<td width="783" height="50" valign="top"><table width="100%" height="50" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="783" height="50" valign="top" style="word-break:break-all"><%=rst("i_logolr")%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width="998" height="15" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="998" height="15" align="center" valign="middle" nowrap><marquee behavior="scroll" direction="left" scrollamount="2" onmouseover="stop()" onmouseout="start()"><%=rst("i_movetx1")%></marquee></td>
</tr>
</table></td>
</tr>
<tr>
<td height="180" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="499" height="180" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="499" height="180" valign="top" style="word-break:break-all"><%=rst("i_dggl")%></td>
</tr>
</table></td>
<td width="499" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="499" height="180" valign="top" style="word-break:break-all"><%=rst("i_dggr")%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width="998" height="120" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="998" height="120" valign="top" style="word-break:break-all"><%=rst("i_zggl")%></td>
</tr>
</table></td>
</tr>
<tr>
<td width="998" height="15" align="center" valign="middle" nowrap><marquee behavior="scroll" direction="left" scrollamount="2" onmouseover="stop()" onmouseout="start()"><%=rst("i_movetx2")%></marquee></td>
</tr>
<tr>
<td height="346" valign="top"><table width="100%" height="492" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="245" height="492" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="245" height="200" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="245" height="30" align="center" valign="middle" bgcolor="#CCCCCC" style="word-break:break-all"><span class="style4">公告栏</span></td>
</tr>
<tr>
<td height="170" valign="top" style="word-break:break-all"><marquee behavior="scroll" direction="up" scrollamount="1" onmouseover="stop()" onmouseout="start()"><br>&nbsp;&nbsp;<%=rst("i_wygg")%></marquee></td>
</tr>
</table></td>
</tr>
<tr>
<td width="245" height="200" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="245" height="200" valign="top" style="word-break:break-all"><%=rst("i_dgg1")%></td>
</tr>
</table></td>
</tr>
<tr>
<td width="245" height="120" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="245" height="120" valign="top" nowrap style="word-break:break-all"><%=rst("i_dgg2")%></td>
</tr>
</table></td>
</tr>
<tr>
<td width="245" height="120" valign="top" nowrap><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="245" height="120" valign="top" style="word-break:break-all"><%=rst("i_dgg3")%></td>
</tr>
</table></td></tr>
<tr>
<td width="245" height="120" valign="top" nowrap><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="245" height="120" valign="top" style="word-break:break-all"><%=rst("i_dgg4")%></td>
</tr>
</table></td>
</tr>
<tr>
<td height="249" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl1")%>" target="_blank"><img src="<%=rst("i_tpgg1")%>" height="130" width="115"></a></td>
<td width="15" rowspan="12" valign="top" nowrap><!--DWLayoutEmptyCell-->&nbsp;</td>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl2")%>" target="_blank"><img src="<%=rst("i_tpgg2")%>" height="130" width="115"></a></td>
</tr>
<tr>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex1")%> </td>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex2")%></td>
</tr>
<tr>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl3")%>" target="_blank"><img src="<%=rst("i_tpgg3")%>" height="130" width="115"></a></td>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl4")%>" target="_blank"><img src="<%=rst("i_tpgg4")%>" height="130" width="115"></a></td>
</tr>
<tr>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex3")%></td>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex4")%></td>
</tr>
<tr>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl5")%>" target="_blank"><img src="<%=rst("i_tpgg5")%>" height="130" width="115"></a></td>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl6")%>" target="_blank"><img src="<%=rst("i_tpgg6")%>" height="130" width="115"></a></td>
</tr>
<tr>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex5")%></td>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex6")%></td>
</tr>
<tr>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl7")%>" target="_blank"><img src="<%=rst("i_tpgg7")%>" height="130" width="115"></a></td>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl8")%>" target="_blank"><img src="<%=rst("i_tpgg8")%>" height="130" width="115"></a></td>
</tr>
<tr>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex7")%></td>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex8")%></td>
</tr>
<tr>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl9")%>" target="_blank"><img src="<%=rst("i_tpgg9")%>" height="130" width="115"></a></td>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl10")%>" target="_blank"><img src="<%=rst("i_tpgg10")%>" height="130" width="115"></a></td>
</tr>
<tr>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex9")%></td>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex10")%></td>
</tr>
<tr>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl11")%>" target="_blank"><img src="<%=rst("i_tpgg11")%>" height="130" width="115"></a></td>
<td width="115" height="130" align="center" valign="middle" nowrap><a href="<%=rst("i_tpggl12")%>" target="_blank"><img src="<%=rst("i_tpgg12")%>" height="130" width="115"></a></td>
</tr>
<tr>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex11")%></td>
<td width="115" height="15" align="center" valign="middle" nowrap><%=rst("i_tex12")%></td>
</tr>
</table></td>
</tr>
<tr>
<td width="245" height="10" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
</table></td>
<%
page=request.QueryString("page")
set rst1=server.CreateObject("adodb.recordset")
if request.QueryString("act")="sos" then
if request.Form("so")=""and request.Form("stype")="全部" then
sql="select * from yingsiku order by y_date desc,y_time desc"
elseif request.Form("so")="" and request.Form("stype")<>"全部" then
sql="select * from yingsiku where y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
elseif request.Form("so")<>"" and request.Form("stype")="全部" then
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' order by y_date desc,y_time desc"
else
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' and y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
end if
rst1.open sql,conn,1,1
rst1.PageSize=11
zongye=rst1.Pagecount
page=int(request("page"))
if page<=0 then page=1
if page="" then page=1
if not rst1.eof and not rst.bof then
rst1.Absolutepage=page
else
%>
<div align="center" class="t1"><a href="index.asp"><%response.write"您要的影片:《"&request.Form("so")&"》没有找到,请返回!!"%></a></div><%
end if
%>
<td width="753" valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<% for i=1 to rst1.PageSize
if not rst1.eof then
if i<>5 then
%>
<tr>
<td width="743" height="20" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<td width="753" height="20" align="left" valign="middle" nowrap bgcolor="#CCCCCC">更新时间:<%=rst1("y_date")%>&nbsp<%=rst1("y_time")%> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="220" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="180" height="220" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="180" height="220" align="center" valign="middle"><a href="xiazai.asp?id=<%=rst1("y_id")%>" target="_blank"><img src="<%=rst1("y_tp")%>" width="180" height="220"></a></td>
</tr>
</table></td>
<td width="570" valign="top"><table width="100%" height="240" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="570" height="30" align="center" valign="middle"><blockquote>
<p>
<br><div align="center">影片名称:<a href="xiazai.asp?id=<%=rst1("y_id")%>" class="t1">《<%=rst1("y_name")%>》</a>&nbsp;<span class="style7">←点击下载</span>
</p>
</blockquote></td>
</tr>
<tr>
<td height="200" valign="top" style="word-break:break-all"><p><br>《<%=rst1("y_name")%>》简介:<br>
&nbsp&nbsp&nbsp&nbsp<%=rst1("y_neirong")%><p></p>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<%else%>
<tr>
<td width="753" height="120" align="center" valign="middle">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="753" height="120" valign="top" style="word-break:break-all"><%=rst("y_zjgg")%></td>
</tr>
</table></td>
</tr>
<tr>
<%end if%>
<td width="753" height="20" valign="top">
<%

rst1.movenext
end if
next
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="753" height="20" align="center" valign="middle" bgcolor="#CCCCCC">
<% response.write"第"&page&"页:→"
for i=1 to zongye
if page<>i then%>
<a href="index.asp?act=so&page=<%=i%>"><%=i%></a>
<%end if
next
else
rst1.open "select * from yingsiku order by y_date desc,y_time desc",conn,1,1

rst1.PageSize=11
zongye=rst1.Pagecount
page=int(request("page"))
if page<=0 then page=1
if page="" then page=1
if not rst1.eof and not rst.bof then
rst1.Absolutepage=page
else
%>
<div align="center" class="t1"><a href="index.asp"><%response.write"您要的影片:《"&request.Form("so")&"》没有找到,请返回!!"%></a></div><%
end if
%>
<td width="753" valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<% for i=1 to rst1.PageSize
if not rst1.eof then
if i<>5 then
%>
<tr>
<td width="743" height="20" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<td width="753" height="20" align="left" valign="middle" nowrap bgcolor="#CCCCCC">更新时间:<%=rst1("y_date")%>&nbsp<%=rst1("y_time")%> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="220" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="180" height="220" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="180" height="220" align="center" valign="middle"><a href="xiazai.asp?id=<%=rst1("y_id")%>" target="_blank"><img src="<%=rst1("y_tp")%>" width="180" height="220"></a></td>
</tr>
</table></td>
<td width="570" valign="top"><table width="100%" height="240" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="570" height="30" align="center" valign="middle"><blockquote>
<p>
<br><div align="center">影片名称:<a href="xiazai.asp?id=<%=rst1("y_id")%>" class="t1">《<%=rst1("y_name")%>》</a>&nbsp;<span class="style7">←点击下载</span>
</p>
</blockquote></td>
</tr>
<tr>
<td height="200" valign="top" style="word-break:break-all"><p><br>《<%=rst1("y_name")%>》简介:<br>
&nbsp&nbsp&nbsp&nbsp<%=rst1("y_neirong")%><p></p>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<%else%>
<tr>
<td width="753" height="120" align="center" valign="middle">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="753" height="120" valign="top" style="word-break:break-all"><%=rst("y_zjgg")%></td>
</tr>
</table></td>
</tr>
<tr>
<%end if%>
<td width="753" height="20" valign="top">
<%

rst1.movenext
end if
next
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="753" height="20" align="center" valign="middle" bgcolor="#CCCCCC">
<% response.write"第"&page&"页:→"
for i=1 to zongye
if page<>i then%>
<a href="index.asp?page=<%=i%>"><%=i%></a>
<%end if
next
end if %></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>

</table></td>
</tr>
<tr>
<td height="181" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<%end if%>
<td width="998" height="120" align="center" valign="middle" style="word-break:break-all"><%=rst("i_ymdb")%></td>
</tr>
<tr>
<td width="998" height="80" align="center" valign="middle" class="t2" style="word-break:break-all"><%=rst("y_bq")%></td>
</tr>
</table></td>
</tr>
</table>
<%
rst.close
set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>

[此贴子已经被作者于2007-3-25 16:42:09编辑过]

搜索更多相关主题的帖子: 936 css include PUBLIC file 
2007-03-25 15:58
hai20041004
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-3-14
收藏
得分:0 
晕…………代码如何发帖啊………………

[此贴子已经被作者于2007-3-25 16:17:32编辑过]


2007-03-25 16:08
hai20041004
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-3-14
收藏
得分:0 

晕……代码帖要怎么发帖啊…………

2007-03-25 16:10
hai20041004
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-3-14
收藏
得分:0 
怎么没人帮忙啊…………
2007-03-25 16:56
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 

分页条件没有被传递。

2007-03-25 17:27
hai20041004
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-3-14
收藏
得分:0 
以下是引用yms123在2007-3-25 17:27:50的发言:

分页条件没有被传递。

谢谢版主,要如何传递啊
2007-03-25 17:35
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
最简单的方法是把查询语句存入session中
在这句话之前可以这样写
if session("tsql")<>"" Then
sql=session("tsql")
else
session("tsql")=sql
end if
rst1.open sql,conn,1,1
2007-03-25 17:45
hai20041004
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-3-14
收藏
得分:0 
以下是引用yms123在2007-3-25 17:45:59的发言:
最简单的方法是把查询语句存入session中
在这句话之前可以这样写
if session("tsql")<>"" Then
sql=session("tsql")
else
session("tsql")=sql
end if
rst1.open sql,conn,1,1

是不是这样加的,不知错在哪里还是不行哦,谢谢
if request.QueryString("act")="sos" then
if request.Form("so")=""and request.Form("stype")="全部" then
sql="select * from yingsiku order by y_date desc,y_time desc"
session("tsql")=sql
elseif request.Form("so")="" and request.Form("stype")<>"全部" then
sql="select * from yingsiku where y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
session("tsql")=sql
elseif request.Form("so")<>"" and request.Form("stype")="全部" then
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' order by y_date desc,y_time desc"
session("tsql")=sql
else
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' and y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
session("tsql")=sql
end if
if session("tsql")<>"" Then
sql=session("tsql")
else
session("tsql")=sql
end if
rst1.open sql,conn,1,1

2007-03-25 18:07
hai20041004
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-3-14
收藏
得分:0 
改成这样还是不行哦,谢谢
if request.QueryString("act")="sos" then
if request.Form("so")=""and request.Form("stype")="全部" then
sql="select * from yingsiku order by y_date desc,y_time desc"
elseif request.Form("so")="" and request.Form("stype")<>"全部" then
sql="select * from yingsiku where y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
elseif request.Form("so")<>"" and request.Form("stype")="全部" then
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' order by y_date desc,y_time desc"
else
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' and y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
end if
if session("tsql")<>"" Then
sql=session("tsql")
else
session("tsql")=sql
end if
rst1.open sql,conn,1,1
2007-03-25 18:33
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
if request.QueryString("act")="sos" then
if request.Form("so")=""and request.Form("stype")="全部" then
sql="select * from yingsiku order by y_date desc,y_time desc"
session("tsql")=sql
elseif request.Form("so")="" and request.Form("stype")<>"全部" then
sql="select * from yingsiku where y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
session("tsql")=sql
elseif request.Form("so")<>"" and request.Form("stype")="全部" then
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' order by y_date desc,y_time desc"
session("tsql")=sql
else
sql="select * from yingsiku where y_name like '%"&request.Form("so")&"%' and y_type='"&request.Form("stype")&"' order by y_date desc,y_time desc"
end if
if session("tsql")<>"" Then
sql=session("tsql")
else
session("tsql")=sql
end if
rst1.open sql,conn,1,1
这样写也不行吗?
2007-03-25 18:33
快速回复:[求助]查找分页……
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.036975 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved