asp 简单的问题
--------------------------------
id id2
1 1
2 0
3 0
---------------------------------
id 为自动编号 当我判断id=1的时候 id2项为1 怎么给其他的id为0,一下蒙了
UPDATE id2=1 WHERE id=1;
UPDATE id2=0 WHERE id <>1;
这样吗?
UPDATE table SET id2=1 WHERE id=1;
UPDATE table SET id2=0 WHERE id <>1;
能不能只用一个sql语句
<%
skin=request("skin")
if request("skin") <>"" then
Set rs=Server.CreateObject("adodb.recordSet")
rs.open "select * from skin where skin='"&skin&"'",conn,1,3
rs("style")=1
rs.update
rs.close
Set rs=Server.CreateObject("adodb.recordSet")
rs.open "select * from skin where skin <>'"&skin&"'",conn,1,3
rs("style")=0
rs.update
rs.close
set rs=nothing
end if
%>
我这样写也不行不知道怎么弄,插入的那个rs("style")是为1 可是没给条件的rs("style")还是为1
自动编号好像不可写的。
SQL code:
update table
set id2 = 0
where (select count(*) from table where id=1 and
相关问答:
<!--#include file="Conn.asp"-->
<body>
<table border="0" align="left" cellpadding="0" cellspacing="0">
<%
URL ......
news表里有pname(上层科目),mname(科目),type(分类)这三个字段;
下面这个递归.实验测试只能递归到110层..需要怎么改,才能无限??
JScript code:
function gethz(pname8,type8)
dim str,rs
......
进来维护了用类编写的ASP网站,开始了解了 一点类的操作。
以前做网站都是在《% %》写代码的?
看看 CMS好像都是用类写的,自己也看了代码 好像比较难, 看得懂都不知道要到什么时候才明白。
头晕啊! ......
"title"这个值保存不了?请问高手错误原因
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from question",conn,1,3
if ......