加入收藏 | 设为首页 | 会员中心 | 我要投稿 银川站长网 (https://www.0951zz.com/)- 云通信、基础存储、云上网络、机器学习、视觉智能!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

ASP批量革新代码

发布时间:2023-05-26 13:09:49 所属栏目:Asp教程 来源:
导读:ASP批量革新代码:<!--#include file="../Conn.asp"--><%set rs=server.createobject("adodb.recordset")sql="select * from article where bigtypes=&#39;我爱你&#39;order by id desc" 找出数据库内类别为我爱你

ASP批量革新代码:

<!--#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 "成功....."

%>

(编辑:银川站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章