ASP高手请进来!关于更新数据的问题 急!!!!

来源:百度知道 编辑:UC知道 时间:2024/05/09 13:20:07
<!--#include file="conn.asp"-->
<%
id=request.QueryString("id")
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * FROM top_index WHERE id="&id
rs.open sql,conn,1,1
if rs.bof then
end if
%>
<%
dim id
If trim(Request.QueryString("id"))="" then
id=trim(Request.ServerVariables("HTTP_REFERER"))
else
id=trim(Request.QueryString("id"))
end if

If Request.QueryString("save")=1 then
Set rs=Server.CreateObject("ADODB.Recordset")

sql="select * FROM top_index WHERE id="&id

rs.open sql,conn,1,3

rs("id")= Request("id")
rs("qu")=qu
rs("name")=name
rs("www")=qu
rs.update
rs.close
response.Redirect "top_s.asp"

<%
dim id
If trim(Request.QueryString("id"))="" then
id=trim(Request.ServerVariables("HTTP_REFERER"))
else
id=trim(Request.QueryString("id"))
end if

If Request.QueryString("save")=1 then
Set rs=Server.CreateObject("ADODB.Recordset")

sql="select * FROM top_index WHERE id="&id

rs.open sql,conn,1,3

rs("id")= Request("id")
rs("qu")=qu
rs("name")=name
rs("www")=qu
rs.update
rs.close
response.Redirect "top_s.asp"
%>

改为
<%
dim id2
If trim(Request.QueryString("id"))="" then
id2=trim(Request.ServerVariables("HTTP_REFERER"))
else
id2=trim(Request.QueryString("id"))
end if

If Request.QueryString("save")=1 then