欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ASP批量更新代碼

 更新時間:2008年03月08日 23:38:42   作者:  
我作了一個ASP靜態(tài)站,由于網站改片,所以所有靜態(tài)頁都要更新,原來是以時間命名為文件命,現在全部改成ID命名,但數據庫內的保存地址的那個字段無法更新,請各位大蝦指點一二,小弟不勝感激...................
<!--#include file="../Conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from article where bigtypes='我愛你'order by id desc"   找出數據庫內類別為我愛你的所有數據
rs.open sql,conn,1,3
if not rs.eof then
do while not rs.eof
fname = rs("id")&".html"
folder = "../html/Info/"
c_filepath = folder&fname

rs("filepath")=c_filepath
rs.update

rs.movenext
loop
end if
response.redirect "成功....."
%>
解決方法:
復制代碼 代碼如下:

<%
set rs=server.createobject("adodb.recordset")
sql="select * from article where bigtypes='我愛你'order by id desc"   找出數據庫內類別為我愛你的所有數據
rs.open sql,conn,1,3
if not rs.eof then
do while not rs.eof
fname = rs("id")&".html"
folder = "../html/Info/"
c_filepath = folder&fname

conn.execute("update article set filepath='"&c_filepath&"' where id="&rs("id"))

rs.movenext
loop
end if
response.redirect "成功....."
%>

相關文章

最新評論