标题:SQL数据库中多表删除问题
取消只看楼主
chenxingg
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2006-1-5
结帖率:0
 问题点数:0 回复次数:2 
SQL数据库中多表删除问题
程序
<%
userid=request("del")
conn.execute("delete  from [userid] where userid='"&userid&"'")
conn.execute("delect from [usep] where userid='"&userid&"'")
conn.execute("delect from [bmp] where userid='"&userid&"'")
conn.execute("delect from [pipp] where userid='"&userid&"'")
conn.execute("delect from [ply] where userid='"&userid&"'")
conn.execute("delect from [pipp] where userid='"&userid&"'")
conn.execute("delect from [ptexts] where userid='"&userid&"'")
response.Redirect(request.ServerVariables("HTTP_REFERER"))
end if
%>

删除时只执行第一句(conn.execute("delete  from [userid] where userid='"&userid&"'"))

其他的不执行,不知道什么原因
搜索更多相关主题的帖子: SQL 删除 数据库 
2009-12-18 18:09
chenxingg
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2006-1-5
得分:0 
前边有一个参数判断
if request("del")<>"" then
userid=request("del")
conn.execute("delete  from [userid] where userid='"&userid&"'")
conn.execute("delect from [usep] where userid='"&userid&"'")
conn.execute("delect from [bmp] where userid='"&userid&"'")
conn.execute("delect from [pipp] where userid='"&userid&"'")
conn.execute("delect from [ply] where userid='"&userid&"'")
conn.execute("delect from [pipp] where userid='"&userid&"'")
conn.execute("delect from [ptexts] where userid='"&userid&"'")
response.Redirect(request.ServerVariables("HTTP_REFERER"))
end if

淘服网www.
2009-12-18 19:30
chenxingg
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2006-1-5
得分:0 
我去跳楼了

delete

搞成了 delect

淘服网www.
2009-12-18 20:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-293853-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.733244 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved