⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delcategory.asp

📁 电子商务网络购物系统
💻 ASP
字号:
<% Option Explicit %>
<!--#include file="conn.asp" -->
<%
Server.ScriptTimeout =  1000

Dim rsST
Dim intBoardID
Dim lngPollID
Dim intForumID

intBoardID = CInt(Request.QueryString("CatID"))
Set rsST = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT timesbbs.* FROM timesbbs WHERE timesbbs.boardid ="  & intBoardID & ";"
rsConn.Open strSQL, adoCon
Do While NOT rsConn.EOF
	intForumID = CInt(rsConn("bbsid"))
	strSQL = "SELECT timestopic.* FROM timestopic WHERE timestopic.bbsid ="  & intForumID & ";"
	rsST.Open strSQL, adoCon
	Do While NOT rsST.EOF
		strSQL = "DELETE FROM timespost WHERE timespost.topicid ="  & CLng(rsST("topicid")) & ";"
		adoCon.Execute(strSQL)
		lngPollID = CLng(rsST("pollid"))
		If lngPollID > 0 Then
			strSQL = "DELETE FROM timeschoice WHERE timeschoice.pollid =" & lngPollID & ";"
			adoCon.Execute(strSQL)
			strSQL = "DELETE FROM timespoll WHERE timespoll.pollid =" & lngPollID & ";"
			adoCon.Execute(strSQL)
		End If
		rsST.MoveNext
	Loop
	strSQL = "DELETE FROM timestopic WHERE timestopic.bbsid ="  & intForumID & ";"
	adoCon.Execute(strSQL)
	strSQL = "DELETE FROM timesaccess WHERE timesaccess.bbsid ="  & intForumID & ";"
	adoCon.Execute(strSQL)
	rsST.Close
	rsConn.MoveNext
Loop
strSQL = "DELETE FROM timesbbs WHERE timesbbs.boardid ="  & intBoardID & ";"
adoCon.Execute(strSQL)
strSQL = "DELETE FROM timesboard WHERE timesboard.boardid ="  & intBoardID & ";"
adoCon.Execute(strSQL)
rsConn.Close
Set rsConn = Nothing
Set rsST = Nothing
adoCon.Close
Set adoCon = Nothing
Response.Redirect "disforum.asp"
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -