刘翔2004年夺冠采访:求救!!!!!!!!!!!ASP

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 08:37:26
<A href="new_chang.asp">返回</A>
<!-- #include file="conn.asp"-->
<%
xh=cint(request("xh"))
'field=array("N_title","N_nr")
'value=array(N_title,N_nr)
'sql="update news set "
'for i=0 to ubound(field(i))&"='"&value(i)&"'"
'if i<>ubound(field) then
'sql=sql & ","
'else
'sql=sql &" where id=" & xh
'end if
'next

id=cint(request("id"))
N_title=request("N_title")
N_nr=request("N_nr")
N_date=now()
N_isnull=cint(request("N_isnull"))
sql="update news set N_date='"&now()&"' where id='"&id&"'and N_title='"&N_title&"'and N_nr='"& N_nr &"' and N_date='"& N_date&"' and N_isnull='"& N_isnull &"'"
'response.Write sql
conn.execute(sql)
response.Write("记录已经添加")

set rs=conn.execute(sql)
set conn=nothing
response.Write "你已经成功修改"
%>
数据库db1 表名news 内容id N_title,N_nr,N_date,N_isnull
请问谁能帮我改下!!!!
没有用的代码我已经注释

你这个记录添加的SQL语句应该是根据id来更新一些数据吧,那就应该这样写:

sql="update news set " & _
"N_title='"&N_title&"'," & _
"N_nr='"&N_nr&"'," & _
"N_date='"&N_date&"'," & _
"N_isnull='"&N_isnull&"' " & _
"where id="&id&""

不明白,你要改什么啊/

看不懂