ASP问题,在线等待
下面是我复合查询数据库的代码
<%
mhdz=trim(request( "mhdz "))
dhsq=trim(request( "dhsq "))
dhsqy=trim(request( "dhsqy "))
dhsqr=trim(request( "dhsqr "))
set rs=server.createobject( "adodb.recordset ")
sql= "select * from bbs1 where mhdz= ' "& mhdz & " ' and dhsq= ' "& dhsq & " ' and dhsqy= ' "& dhsqy & " ' and dhsqr= ' "& dhsqr & " ' order by id desc "
rs.open sql,conn,1%>
然后下面是分页的代码:
<%
set rs=server.createobject( "adodb.recordset ")
page = CLng(request( "page ")) '利用CLng函数把page值转换为Long型
judge=request( "judge ")
judge2=request( "judge2 ")
judge3=0
sql= "select * from bbs1 order by id DESC "
set rs=server.createobject( "adodb.recordset ")
rs.open sql,conn,1,1
id=rs.recordcount
%>
我想把两个全部放在一个页面里,可我一放进去,要么只能查询,就不能分页。
要么查询的功能失败,就可以分页。请那个朋友帮我解决好吗。
反正我的目的是要能查询,而且可以分页的。
请帮我直接写出来吧!
------解决方案--------------------sql= "select * from bbs1 order by id DESC "
你的分页只对这个数据集进行的,查询以后当然不行了阿