set rs=server.createobject("adodb.recordset")
sql8="select * from news Where cataid= "& Nclassid &" order by id desc"
rs.open sql8,objConn,1,1 在页面中这里是第120行
If rs.Bof Or rs.Eof Then
Response.Write "This is not nothing!"
%>
<%
Else
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs.pagesize=18
if pagecount>rs.pagecount or pagecount<=0 then
pagecount=1
end if
rs.AbsolutePage=pagecount
i=1
Do while not rs.eof and i<=rs.pagesize
%>作者: 君临贵妃 时间: 2009-12-27 01:30
Nclassid的值为空,检查接收到值没有。作者: 我是医师 时间: 2009-12-27 01:30
没解决.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<!--#include file=conn2.asp-->
<% Nclassid=request.QueryString("Nclassid") %>
<%
Sub page(par)
response.Write("<table width='97%' border='0' align='left' class='hongda'> ")
response.Write("<tr>")
response.Write("<td align='left'>")
if rs.pagecount>1 then
response.Write "现为第"&pagecount&"页/共 "&rs.pagecount&"页 "
if pagecount>=10 then
response.write"<a href="&par&"?Nclassid="&request("Nclassid")&"&page="&(((cstr(pagecount)\10)-1)*10)+1&">UP</a> "
end if
q=(cstr(pagecount)-1)\10
if q<0 then
q=1
end if
p=(q*10)+1
do while p<((q*10)+11)
If p=pagecount Then
Response.Write p & " "
Elseif p<=rs.pagecount then
Response.Write "<a href='"&par&"?Nclassid="&request("Nclassid")&"&page="&p&"'>"&p&"</a> "
End If
p=p+1
loop
A=rs.pagecount
if (A mod 10)=0 then
A=rs.pagecount-1
end if
if pagecount<(A\10)*10 then
response.write"<a href="&par&"?Nclassid="&request("Nclassid")&"&page="&((((cstr(pagecount)-1)\10)+1)*10)+1&">NEXT</a>"
end if
End If
response.Write("</td>")
response.Write("</tr>")
response.Write("</table>")
End Sub
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>浙江申科滑动轴承有限公司--公司主要生产交直流电机、汽轮发电机、汽轮机、水轮机、风机、水泵、压缩机及其他旋转机器用的轴承</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url();
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
color: #990000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #990000;
}
a:hover {
text-decoration: underline;
color: #666666;
}
a:active {
text-decoration: none;
}
-->
</style></head>
set rs=server.createobject("adodb.recordset")
sql8="select * from news Where cataid="& request("Nclassid") &" order by id desc"
rs.open sql8,objConn,1,1
If rs.Bof Or rs.Eof Then
Response.Write "This is not nothing!"
%>
<%
Else
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs.pagesize=18
if pagecount>rs.pagecount or pagecount<=0 then
pagecount=1
end if
rs.AbsolutePage=pagecount
i=1
Do while not rs.eof and i<=rs.pagesize
sql8="select * from news Where cataid= "& Nclassid &" order by id desc"
把这条语句下面的值先暂时注释掉,然后再在这条语句下面加一语句。
Response.Write sql8
看看SQL语句是否正确显示出来了。作者: 飘香剑雨 时间: 2009-12-27 01:30
还没解决就可能问题没有出在这个地方,上一个页面。作者: 陪你疯→想你 时间: 2009-12-27 01:30
你学到了什么呢?
如果没有思考去来为什么,我想,这是没有任何意义的.作者: 幻影 时间: 2009-12-27 01:30
<%
set rs=server.createobject("adodb.recordset")
sql8="select * from news Where cataid=12 order by id desc"
rs.open sql8,objConn,1,1 在页面中这里是第120行
If rs.Bof Or rs.Eof Then
Response.Write "This is not nothing!"
%>