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
相关问答:
我用ASP做了一个论坛页面,要统计阅读数。每打开页面一次就UPDATE阅读数那个字段,这样只要页面刷新一次就会UPDATE一次,请问要怎么防止刷新页面来增加阅读数?
清除缓存 判断上页来源地址 这个只是想法 我没有实践 ......
<asp:button>默认会提交页面,如何将 <asp:button>不提交页面,而执行其他的函数,即asp中的 <input type="button">
如何将 <asp:button>重置页面的表单值,即asp中的 <in ......
Active Server Pages 错误 'ASP 0113'
脚本超时
/admin/affiche_zx/i ......
又遇到问题乐。。
http://localhost/vsnet/LssearchC.aspx?searchtxt=王&city1===选择省份==&city2===选择市==&city3===选择区(县)==
这是asp里面的
<iframe src="vsne ......
id lbname topid ceng
1 产品1 0 1
16 产品2 0 1
17 产品3 0 1
18 产品4 0 1
19 产品5 0 1
20 产品6 0 1
21 产品7 0 1
22 产品8 0 1
23 产品9 0 1
24 产品10 0 1
25 产品11 0 1
......