现在我读了数据想写入进数据库[修改操作],可是按下列代码只能写入最后一条数据,请问怎么循环才能将复选框中的ID项目全部写入进数据库中?
代码如下:
a=request.Form("id")
b=split(a,",")
for i=0 to UBound(b)
if i = 0 then m=b(i)
if i <>0 then m=m&","&b(i)
next
'response.Write(m)
m="("&m&")"
set rs= server.CreateObject("adodb.recordset")
sql = "select * from D_Order where M_id in "&m
'response.Write sql
rs.open sql,conn,3,3
rs("M_Code")=session("Onum")
rs.update
rs.close
conn.close
set rs=nothing