大小类产品调用删除代码

1

本文作者:laibu  发布于:2007-8-24  分类:网站制作  点击:


-------------显示小类名称-----------------------
<%=rsSmallClass("SmallClassName")%>
---------------删除小类-----------------------
ClassDelSmall.asp?SmallClassID=<%=rsSmallClass("SmallClassID")%>
--------------ClassDelSmall.asp内容------------
<%@language=vbscript codepage=936 %>
<!--#include file="Conn.asp"-->
<!--#include file="Admin.asp"-->
<%
dim SmallClassID,sql
SmallClassID=trim(Request("SmallClassID"))
sql = "select CenterClassName,SmallClassName from SmallClass where SmallClassID=" & Cint(SmallClassID)
set rs = conn.execute(sql)
if not rs.eof then
    bigClassName = rs(0)
   else
    response.End()
   end if
 conn.execute "delete from  price  where CenterClassName='" & rs(0) & "' and SmallClassName='" & rs(1) & "'"
 conn.execute "delete from  product  where CenterClassName='" & rs(0) & "' and SmallClassName='" & rs(1) & "'"
   if SmallClassID<>"" then
 sql="delete from SmallClass where SmallClassID="&Cint(SmallClassID)&""
 conn.Execute sql
end if
call CloseConn()     
response.redirect "ClassManage.asp"
%>
-----------调用大类列表---------------------
<%=rsBigClass("BigClassName")%> 
-------------删除大类包括小类-----------------   
ClassDelBig.asp?BigClassID=<%=rsBigClass("BigClassID")%>
-----------------------------------
ClassDelBig.asp内容
---------------------------------
<%@language=vbscript codepage=936 %>
<!--#include file="Conn.asp"-->
<!--#include file="Admin.asp"-->
<%
dim BigClassName,sql
BigClassName=trim(Request("BigClassName"))
if BigClassName<>"" then
 sql="delete from BigClass where BigClassName='" & BigClassName & "'"
 conn.Execute sql
 sql="delete from CenterClass where BigClassName='" & BigClassName & "'"
 conn.Execute sql
 sql="delete from SmallClass where BigClassName='" & BigClassName & "'"
 conn.Execute sql
end if
call CloseConn()     
response.redirect "ClassManage.asp"
%>
-------------------------------------
本文标签: computuer  
本文Url: http://www.918x.cn/post/255.html (出自: 黑暗天堂)
我要引用: 点击这里获取该日志的TrackBack引用地址

相关文章:

248. 关于垃圾评论通告  (2007-8-10 18:38:49)

229. 本地安全策略怎样设置,才能不用杀毒软件安全上网  (2007-7-14 19:15:25)

226. photoshop个人笔记总结  (2007-7-8 19:6:22)

222. 挂马代码集合  (2007-7-6 20:53:37)

212. 系统时间修改的命令  (2007-6-6 22:11:51)

211. 电脑的最忌|弱智问题  (2007-6-5 23:11:42)

203. B2B商城的设置数据库修改.防止他人攻击  (2007-5-19 12:14:22)

202. 最新QQ2007beta2外挂|QQ2007beta2外挂下载  (2007-5-18 13:5:9)

198. 简单记数器代码|Erentan's赐教  (2007-5-14 13:39:29)

196. ARP欺骗详细介绍与安全防范  (2007-5-13 12:25:48)

1 Comments

5
643

Write a comment ?