关于数据库和FOR循环问题(ASP)

来源:百度知道 编辑:UC知道 时间:2024/05/28 07:53:25
首先知道数据表user里有个pose字段
里面的值是1|||4|5|6|7
然后下面我是用循环方式输出
pose=user("pose")
pose=user(pose,"|")
for i=0 to 6
response.write ""&pose(i)&""
next
我想实现这样的效果
首先是把pose的值分别用图片代替
比如输出的是1457
如果输1那么就用1.gif代替1输出
那么输出的就是1.gif 4.gif 5.gif 7.gif
这个怎么实现????
写错了
pose=user("pose")
pose=split(pose,"|")
for i=0 to 6
response.write ""&pose(i)&""
next

pose=user("pose")
pose=split(pose,"|")
for i=0 to ubound(pose)
StrPicName=pose(i)&".gif"
response.write("<img src='" & StrPicName & "'>")
next

注意,
1.此处用user作字段容易引起错误,因它是关键字,最好改个别的字段名
2.response.write ""&pose(i)&"" 是不可能输出图片的