網路考場(17)(轉)tviewscore.asp

來源:互聯網
上載者:User
core|網路 <%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<P align=center><STRONG><FONT color=crimson face="" size=4>
<%=Request.QueryString("sub")%>課的考試成績
</FONT></STRONG></P>
<P align=center><FONT color=dodgerblue face="" size=2>
任課教師:<%=Request("teachname")%>
</FONT></P>
<P align=center>
<TABLE border=0 cellPadding=1 cellSpacing=1 width=75%>
    <TR  bgcolor=Peachpuff>
        <TD>姓名</TD>
        <TD>成績</TD>
        <TD>名次</TD></TR>
<%
set conn=server.CreateObject("adodb.connection")
conn.ConnectionString="dsn=testsys"
conn.Open
'聲明sql查詢語句,從資料庫中查詢相應科目的考試成績,查詢結構按降序方式排序
strsql="SELECT score.score, studentinfo.stname FROM score,studentinfo where score.stid = studentinfo.stid and teachid='" & Request.QueryString("teachid") & "' and score.sub='" & Request.QueryString("sub") & "' ORDER BY score.score DESC"
set mrs=conn.Execute(strsql)
i=1
while not mrs.eof
    '以表格的形式顯示相應考試科目的成績和學生姓名
    Response.Write "<TR>"
    Response.Write "<TD>"
    Response.Write mrs("stname")
    Response.Write "</TD>"
    Response.Write "<TD>"
    Response.Write mrs("score")
    Response.Write "</TD>"
    Response.Write "<TD>" & i & "</TD></TR>"
    i=i+1
    mrs.movenext
wend
conn.Close
set conn=nothing
%>
<TR  bgcolor=Peachpuff><TD></TD><TD></TD><TD></TD></TR>
    </TABLE>
</P>
</BODY>
</HTML>



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.