"id"andpagt<>"yhname"andpagt<>"CultureType"andpagt<>"LivestockType"andpagt<>"newtime"the...
pagt=request.QueryString("pagt")
if pagt="" and pagt<>"id" and pagt<>"yhname" and pagt<>"CultureType" and pagt<>"LivestockType" and pagt<>"newtime" then
page="newtime"
end if
%>
ID | 用户名 | 养殖类型 | 畜别 | 注册时间 |
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from yh order by '"&pagt&"' desc",conn,1,1
if rs.eof then
%>
暂时没有添加内容else
nowpage=request.QueryString("nowpage")
if nowpage="" or nowpage<1 then nowpage=1
if not rs.eof then
page_U=10 '每页显示记录数,由此修改
rs.pagesize=page_U
rs.absolutepage=nowpage
end if
n=1
do while (not rs.eof) and n<=page_U
%>
rs.movenext
n=n+1
loop
%>
【 共有记录 条 | 第 页 | 共 =rs.pagecount%> 页 | - ?nowpage=1"> 首页- 0 then%> if (nowpage+1)<=rs.pagecount then%> |
end if
rs.Clone
set rst=nothing
%>
如果把rs.open "select * from yh order by '"&pagt&"' desc",conn,1,1 里的'"&pagt&"'换成主键就可以,为什么用 pagt=request.QueryString("pagt")地址栏传参的方法据不行了呢,帮忙啊~~!
那里都好了,就是以主键排序不行,把rs.open "select * from yh order by '"&pagt&"' desc",conn,1,1 换成rs.open "select * from yh order by 主键 desc",conn,1,1
却可以,用测试request.QueryString方法也正确
展开