ASP 一维数组加值问题。
ar=""&id&","&userid&""'60,1软件ID60,后面则是会员idarr=split(ar,",")fori=1toubound(arr)ifarr(i...
ar=""&id&","&userid&"" '60,1 软件ID 60,后面则是会员id
arr=split(ar,",")
for i=1 to ubound(arr)
if arr(i)=userid then
response.Write "3"'此应用软件已“想过”了,感谢您的支持!
end if
xar=ar&","&id&","&userid&"" '我这里是添加新值进去。'60,1,2,3,4
next
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.ActiveConnection = MM_rs_STRING
rs2.Source = "SELECT * FROM products1 where id="&id
rs2.CursorType = 1
rs2.CursorLocation = 2
rs2.LockType = 2
rs2.Open()
rs2("xy")=xar
rs2.update
Response.Write "2"'感谢您的支持! 展开
arr=split(ar,",")
for i=1 to ubound(arr)
if arr(i)=userid then
response.Write "3"'此应用软件已“想过”了,感谢您的支持!
end if
xar=ar&","&id&","&userid&"" '我这里是添加新值进去。'60,1,2,3,4
next
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.ActiveConnection = MM_rs_STRING
rs2.Source = "SELECT * FROM products1 where id="&id
rs2.CursorType = 1
rs2.CursorLocation = 2
rs2.LockType = 2
rs2.Open()
rs2("xy")=xar
rs2.update
Response.Write "2"'感谢您的支持! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询