📄 truedelcategory.asp
字号:
<!--#include file="../../inc/config.asp" -->
<!--#include file="../../inc/conn.asp" -->
<%
dim categoryID,sql
categoryID=Request.QueryString("categoryID")
sql="delete from L_testCategories where L_categoryID="&categoryID
dim conn
set conn=Server.CreateObject("ADODB.CONNECTION")
set conn=openExamData()
'删除这个类别下属的所有内容
delCategoryAll(categoryID)
conn.execute(sql)
response.Redirect("../view.asp")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
</body>
</html>
<%
function delCategoryAll(categoryID)
'删除指定试卷类别下的所有内容
dim conn
set conn=Server.CreateObject("ADODB.CONNECTION")
set conn=openExamData()
dim sql,rs
sql="select L_testID from L_tests where L_categoryID="&CategoryID&" order by L_updateTime desc"
set rs=Server.createObject("adodb.recordset")
rs.open sql,conn,1,3
if not rs.bof and not rs.eof then
do while not rs.eof
delTestAll(rs("L_testID"))
rs.movenext
loop
end if
end function
function delTestAll(testID)
dim sql,sqlL_options,sqlL_questions,sqlL_solutions,sqlL_types
sql="delete from L_tests where L_testID="&testID
sqlL_options="delete from L_options where L_testID="&testID
sqlL_questions="delete from L_questions where L_testID="&testID
sqlL_solutions="delete from L_solutions where L_testID="&testID
sqlL_types="delete from L_types where L_testID="&testID
dim conn
set conn=Server.CreateObject("ADODB.CONNECTION")
set conn=openExamData()
conn.execute(sql)
conn.execute(sqlL_options)
conn.execute(sqlL_questions)
conn.execute(sqlL_solutions)
conn.execute(sqlL_types)
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -