大哥,我处理了一下,删除不了呀,怎么办呀,你帮我看一下呀,好吗,谢了, <!--#include file="conn.asp"--> <% response.buffer=true
sql="select num from ly" rs.open sql,conn,1,3
dim temp_array temp_array=split(request.form("id")) '我们从ID里分割出值 '下面就是用循环删除
while not rs.eof for i=0 to UBOUND(temp_array) if rs("num")=temp_array(i) then rs.delete continue '这是里loop还是continue哟.我多记不得了 end if next rs.movenext wend rs.updatebatch '这里删除完一起提交,不要用不着rs.update因为那样很慢 rs.close set rs=nothing response.redirect "showlylb.asp" %>
[此贴子已经被作者于2005-2-19 20:52:43编辑过]
for i=1 to request.form("check").count id2=request.form("check")(i) set rs=server.createobject("adodb.recordset") sql="select kindid from article where id="&id2 rs.open sql,dbconn,3,2 kindid=rs("kindid") rs.close call rsclose dbconn.execute("delete from article where id="&request.form("check")(i)) next
其中check是复选框的名字~~~
用一个for就行啦~~~
[em44]