F
flyso
Unregistered / Unconfirmed
GUEST, unregistred user!
现在已经实现了被选中的可以将其设为1了,而未被选中的怎么将其设为0啊,请大侠指点啊?用上面大侠所说的in和not in总是提示出错,请问怎么解决呀...
代码如下:
<!--#include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<title>...</title>
</head>
<% sql="select * FROM [aaa]"
rs.Open sql, conn, 1, 2
%>
<%
for i=1 to request("check").count
check=trim(request("check")(i))
response.write check
conn.execute("update aaa set status=1 where name ="&
"'" &check&
"'")
%>
<br>
<%
next
%>
<%
'for each check in request.form("check")
'if check<>"" then
'rs("STATUS")=1
'rs.update
'else
'rs("STATUS")=0
'rs.update
'end if
'next
%>
<body>
</body>
</html>
代码如下:
<!--#include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<title>...</title>
</head>
<% sql="select * FROM [aaa]"
rs.Open sql, conn, 1, 2
%>
<%
for i=1 to request("check").count
check=trim(request("check")(i))
response.write check
conn.execute("update aaa set status=1 where name ="&
"'" &check&
"'")
%>
<br>
<%
next
%>
<%
'for each check in request.form("check")
'if check<>"" then
'rs("STATUS")=1
'rs.update
'else
'rs("STATUS")=0
'rs.update
'end if
'next
%>
<body>
</body>
</html>