如果是查询两个关键字呢?
请看一下我的这个查询程序:
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
SQL=sql="select * from bigclass where bigclassname like '%"&bigclassname&"%' and sheng like '%"&sheng&"%'"
rs.open sql,conn,1,3
rcount=rs.recordcount
if pmcount="" or isempty(pmcount) or pmcount<1 then
pmcount=19
end if
rs.pagesize=pmcount '设置每页数
mpage=rs.pagecount '得到总页数
pageno=Request.QueryString("pageno")
if cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
if rs.bof and rs.eof then
response.write "<tr><td colspan='5'><div align='center'>暂时没有鸽舍加盟</div></td></tr>"
else
rs.absolutepage=pageno '将指针移至指定页的第一条记录
loopno=pmcount
do while not rs.eof and loopno>0
%>
<tr>
<td width="100%" align="left" bgcolor="#F2FFEE"><p style="line-height: 150%; margin-top: 3; margin-bottom: 3"> <img src="images/job_dot02.gif" width="9" height="9" border="0">
<%if len(rs("bigclassname"))<=25 then%>
<%=rs("bigclassname")%>
<%else%>
<%=left(rs("bigclassname"),25)&"…"%>
<%end if%>
</span> </td>
</tr>
<%
rs.movenext
loopno=loopno-1
loop
end if
rs.close
set rs=Nothing
%>
<tr>
<td height="26" colspan="2" align="center" valign="top" bgcolor="#F2FFEE"><span style="font-size: 12px; color: #0066FF"> 共 <%=cstr(rcount)%> 个鸽舍 当前第 <%=cstr(pageno)&"/"&cstr(mpage)%> 页 每页 <%=pmcount%> 条
<%
if cint(pageno)>1 then%>
[ <a href='sheng.asp?pageno=<%=pageno-1%>&sheng=<%=request("sheng")%>' class="tt1">上一页</a> ]
<%
end if
if cint(pageno)<cint(mpage) then
%>
[ <a href='sheng.asp?pageno=<%=pageno+1%>&sheng=<%=request("sheng")%>' class="tt1">下一页</a> ]
<%end if%>
</span> </td>
</tr>
</table>
运行起来后说参数有冲突,请给看一下问题出在什么地方?