| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 380 人关注过本帖
标题:不能显示
只看楼主 加入收藏
niuqinrong
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2008-4-3
结帖率:100%
收藏
 问题点数:0 回复次数:1 
不能显示
<!--#include file="conn.asp"-->
<%
              set rs2=server.createobject("adodb.recordset")
               sql="select * from admin_xx where sjr='"&nqr&"'"
                rs2.open sql,conn,1,1
                 %>



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>未读邮件</title>
<link rel="stylesheet" href="style.css">
</head>

<body topmargin="0">

<!--#include file="top.asp"-->
<table width="100%" border="1">
  <tr>
    <td width="20%" height="219"><table width="100%" border="1" height="100%">
      <tr>
        <td height="80%"><table width="100%" border="1" height="100%">
          <tr>
            <td>未读邮件</td>
          </tr>
          <tr>
            <td>已读邮件</td>
          </tr>
          <tr>
            <td>已发邮件</td>
          </tr>
          <tr>
            <td>写信</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="20%">&nbsp;</td>
      </tr>
    </table></td>
    <td width="80%"><table width="100%" border="1">
      <tr>
        <td><table width="100%" border="1">
          <tr>
             <td align="center" width="10%">&nbsp;</td>
           <td align="left" width="40%">标题</td>
            <td align="center" width="20%">发件人</td>
            <td align="center" width="20%">日期</td>
            <td align="center" width="10%">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="176">
        
        
         <%      
    if Not(rs2.bof and rs2.eof) then'判别数据表中是否为空记录
            NumRecord=rs2.recordcount
            rs2.pagesize=10
            NumPage=rs2.Pagecount
            if request("page")=empty then
            NoncePage=1
        else
        if Cint(request("page"))<1 then
            NoncePage=1
        else
            NoncePage=request("page")
        end if
        if Cint(Trim(request("page")))>Cint(NumPage) then NoncePage=NumPage
    end if
else
    NumRecord=0
    NumPage=0
    NoncePage=0
    end if
%>
        
        
        
        <table width="100%" border="1">
        <%if Not(rs2.bof and rs2.eof) then
    rs2.move (Cint(NoncePage)-1)*10,1
    for i=1 to rs2.pagesize
%>
          <tr>
            <td align="center" width="10%"><img src="image/wei.jpg" width="25" height="20"></td>
           <td align="center" width="40%"><%=rs2("bt")%></td>
            <td align="center" width="20%"><%=rs2("fjr")%></td>
            <td align="center" width="20%"><%=rs2("date")%></td>
            <td align="center" width="10%">删除</td>
           <%                 rs2.movenext
                       if rs2.eof then exit for
                    next
else
    response.write "<tr><td colspan=7><marquee scrolldelay=120 behavior=alternate>没有找到任何邮件!!!</marquee></td></tr>"
end if    

rs2.close
set rs2=nothing

%>
</tr>
        </table>
        <table width="100%" border="0" align="center">
  <tr>
          <td height="17">
            
            <div align="right">
              <input type="hidden" name="page" value="<%=NoncePage%>">
              <%
if NoncePage>1 then
    response.write "|<a href=yx.asp?page=1>首 页</a>| |<a href=yx.asp?page="&NoncePage-1&">上一页</a>|&nbsp"
else
    response.write "|首 页| |上一页|&nbsp"
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
    response.write "|<a href=yx.asp?page="&NoncePage+1&">下一页</a>| |<a href=yx.asp?page="&NumPage&">尾 页</a>|"
else
    response.write "|下一页| |尾 页|"
end if
%>
&nbsp;页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
              共<font color="#FF0000"><%=NumRecord%></font>封&nbsp; </div></td>

</table>
        
        
        </td>
      </tr>
    </table></td>
  </tr>
</table>
我在admin_xx表中查找“sjr”字段值等于“nqr”的记录,admin_xx中存在这样的记录,但ASP页面中却显示“不存在记录”,是不是我的sql语句写的不对啊?
搜索更多相关主题的帖子: content include border title where 
2008-05-06 15:18
niuqinrong
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2008-4-3
收藏
得分:0 
哪位知道的告诉一下,这个是毕业设计,所以有点急!!!
2008-05-06 16:44
快速回复:不能显示
数据加载中...
 
   



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

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