网络考场(16)(转)tselectsub.asp

作者:袖梨 2022-07-02

<%
if Request.QueryString("act")="add" then
    '如果请求加入试题内容,则form1提交的页面为taddquestion.asp
    Response.Write ""
else
    '如果请求修改试题内容,则form1提交的页面为teditquestion.asp
    Response.Write ""
end if
%>

选择所要修改/加入题目的课程


style=" ">
<%
set conn=server.CreateObject("adodb.connection")
conn.ConnectionString="dsn=testsys"
conn.Open
'从存储课程的表subinfo中选择teachid等于当前教师编号的记录
strsql="select * from subinfo where teachid='" & session("teachid") & "'"
set mrs=conn.Execute(strsql)
while not mrs.eof
'将所有的课程加入到select中
    Response.Write "" & mrs("sub")
    mrs.movenext
wend
'关闭并清空数据库连接对象
conn.Close
set conn=nothing
%>



相关文章

精彩推荐