首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

请问一个批量update命令

2012-03-18 
请教一个批量update命令我是要批量更新images表中的s_height字段。前一个页面传递过来的 s_height 和 Image

请教一个批量update命令
我是要批量更新images表中的s_height字段。
前一个页面传递过来的 s_height 和 Image_id 是一批,几十个,值都不同。

set s_height=Request.Form("s_height")

conn.execute("update images set s_height="&s_height&" where Image_id="&Image_id)

上面我这个是错误的。

正确的应该如何?谢谢高手。

[解决办法]
heights=split(s_height,",")
images=split(image_id,",")
count=ubound(heights)
for i=0 to count
a=heights(i);
b=images(i);
conn.execute("update images set s_height='"&a&"' where Image_id="&b)
next

热点排行