asp:如何删除数据库的数据同时并删除图片^^ 10
如何删除数据库的数据同时并同时删除文件夹里相应删除图片?我的删除数据的代码如下:endifdimsql_str,deleteidsql_str="select*fromN...
如何删除数据库的数据同时并同时删除文件夹里相应删除图片?
我的删除数据的代码如下:
end if
dim sql_str,deleteid
sql_str="select * from Net008_productlist order by adddate desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql_str,conn,1,3
deleteid=split(request("deleteid"),",",-1)
delflag=1
for each deleteitem in deleteid
rs.movefirst
while not rs.eof and not rs.bof
if Trim(deleteitem)=Cstr(rs("id")) then
rs.delete
rs.update
delflag=2
end if
rs.movenext
wend
next
if delflag=2 then
response.write "<script>alert('删除成功!');</script>"
response.write "<script>javascript:history.go(-1);window.location.reload();</script>"
else
response.write "<script>alert('Sorry,未选择!');</script>"
response.write "<script>javascript:history.go(-1);</script>"
end if
%>
请各位高手详细的指点一下!给个具体的代码!谢谢!最好有中文注释的 此程序并非我所写 对它是 擀面杖吹火————一窍不通啊 补充:此程序是 一个购物网站程序!所以有点麻烦 展开
我的删除数据的代码如下:
end if
dim sql_str,deleteid
sql_str="select * from Net008_productlist order by adddate desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql_str,conn,1,3
deleteid=split(request("deleteid"),",",-1)
delflag=1
for each deleteitem in deleteid
rs.movefirst
while not rs.eof and not rs.bof
if Trim(deleteitem)=Cstr(rs("id")) then
rs.delete
rs.update
delflag=2
end if
rs.movenext
wend
next
if delflag=2 then
response.write "<script>alert('删除成功!');</script>"
response.write "<script>javascript:history.go(-1);window.location.reload();</script>"
else
response.write "<script>alert('Sorry,未选择!');</script>"
response.write "<script>javascript:history.go(-1);</script>"
end if
%>
请各位高手详细的指点一下!给个具体的代码!谢谢!最好有中文注释的 此程序并非我所写 对它是 擀面杖吹火————一窍不通啊 补充:此程序是 一个购物网站程序!所以有点麻烦 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询