| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 509 人关注过本帖
标题:显示出错!
只看楼主 加入收藏
changhai_14
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-5-3
收藏
 问题点数:0 回复次数:4 
显示出错!

<!--#include file="..\inc\conn.asp"-->
<!--#include file="..\inc\SessionCheck.asp"-->
<%
Call DBConnBegin()
dim course ,tid
tid=session("teacher")
course=Request.Form("course")
IF course<>"" Then
Session("course")=course
Else
course=Session("course")
End IF
%>

<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数字实验室——选课查询</title>
<link rel="stylesheet" href="..\inc\style.css" type="text/css">
</head>

<body topmargin="0" leftmargin="0">
<!--#include file="pagehead.asp"-->
<table width="789" border="0" align="center">
<tr><td width="783" align=left>
<table width="776" height="35" cellspacing="0" cellpadding="0">
<td background="../images/top_1.jpg">
</table>
<div align="center">
<center><form method="POST" action="CourseExamine.asp">
<table border="0" width="700" cellspacing="0" cellpadding="0">
<tr><td align="right">课程选择:<select size="1" name="course"><%
sSql="select * from CourseInfo where TID='"&tid&"'"
oRs.open sSql,oConn,3,2
do while not oRs.eof%><option value="<%=oRs("CID")%>" <%if course=oRs("CID") then Response.write "selected" end if%>><%=oRs("CName")%></option>
<%oRs.movenext
loop
oRs.close%></select>&nbsp;<input type="submit" value="查询" name="B1"></td></tr></table></form>
<table border="0" width="700" cellspacing="0" cellpadding="0">
<% '需要修改!!!!
sSql="select StuInfo.StuName,CourseSelectedInfo.* from CourseSelectedInfo Left Join StuInfo ON StuInfo.StuID= CourseSelectedInfo.StuID where CourseSelectedInfo.StuID in (select StuID from CourseSelectedInfo where CID='"&course&"')"
oRs.open sSql,oConn,1,1
if Not(oRs.bof and oRs.eof) then'判别数据表中是否为空记录
dim NumRecord,NumPage,NoncePage,i
NumRecord=oRs.recordcount
oRs.pagesize=10
NumPage=oRs.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 border="1" width="700" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr><td align="center" colspan="6">选择该实验课的学生列表</td></tr>
<tr>
<td width="71" bgcolor="#EBE9FE" align="center">学号</td>
<td width="78" bgcolor="#EBE9FE" align="center">姓名</td>
<td width="71" bgcolor="#EBE9FE" align="center">考核结果</td>
<td width="71" bgcolor="#EBE9FE" align="center">修改考核</td>
<td width="71" bgcolor="#EBE9FE" align="center">删除考核</td>
</tr>
<%if Not(oRs.bof and oRs.eof) then
oRs.move (Cint(NoncePage)-1)*10,1
for i=1 to oRs.pagesize
%>

<tr>
<td width="71" align="center"><%=oRs("StuID")%></td>
<td width="78" align="center"><%=oRs("StuName")%></td>
<td width="71" align="center"><%if Trim(oRs("EResult"))<>"" then%><%=Trim(oRs("EResult"))%><%else%><a href="toexamine.asp?id=<%=oRs("ID")%>"><font color="red">未考核</font></a><%end if%></td>
<td width="71" align="center"><%if Trim(oRs("EResult"))<>"" then%><a href="toexamine.asp?id=<%=oRs("ID")%> "><font color="blue">修改</font></a><%else%>&nbsp;<%end if%></td>
<td width="71" align="center"><%if Trim(oRs("EResult"))<>"" then%><a href="delexamine.asp?id=<%=oRs("ID")%> " class="link">删除</a><%else%>&nbsp;<%end if%></td>
</tr>
<% oRs.movenext
if oRs.eof then exit for
next
else
response.write "<tr><td colspan=13><marquee scrolldelay=120 behavior=alternate>没有找到任何记录!!!</marquee></td></tr>"
end if

oRs.close
%>

</table>
</table>
<table width="783" border="0">
<tr><td width="748" height="17">
<div align="right">
<input type="hidden" name="page" value="<%=NoncePage%>">
<%
if NoncePage>1 then
response.write "|<a href=CourseExamine.asp?page=1>首 页</a>| |<a href=CourseExamine.asp?page="&NoncePage-1&">上一页</a>|&nbsp"
else
response.write "|首 页| |上一页|&nbsp"
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=CourseExamine.asp?page="&NoncePage+1&">下一页</a>| |<a href=CourseExamine.asp?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
&nbsp;页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>条记录&nbsp; </div>
</td></tr>
</table>
</center></div>
</td></tr></table>
<div align="center">
<%Call DBConnEnd()%>
<!--#include file="pagefoot.asp"-->
</div>
</body>
</html>

在人数超过10以后显示就不按我选的查询条件来显示!不知道出错在哪!!

[此贴子已经被作者于2006-5-4 22:42:57编辑过]

搜索更多相关主题的帖子: teacher content include course color 
2006-05-04 19:46
changhai_14
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-5-3
收藏
得分:0 

请知道提醒一下.谢谢了

[此贴子已经被作者于2006-5-4 22:43:59编辑过]


2006-05-04 20:24
caiyakang
Rank: 2
等 级:新手上路
威 望:5
帖 子:2111
专家分:0
注 册:2005-3-24
收藏
得分:0 
a href="toexamine.asp?id=&lt;%=oRs("ID")%&gt;&amp;cid=&lt;%=oRs("CID")%&gt;"&gt;

中国人的财富网:http://www..cn/
2006-05-04 20:41
lnshice
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-5-4
收藏
得分:0 
是啊  很常见的这个是    就象论坛页面后边的id和page  中间用&amp;连接的

2006-05-04 22:10
hangxj
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2045
专家分:0
注 册:2006-4-10
收藏
得分:0 
不太明白

http://www./
2006-05-05 10:48
快速回复:显示出错!
数据加载中...
 
   



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

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