ASP 删除数组中指定的值

2024-12-21 20:22:10
推荐回答(2个)
回答1:

<%
dim New_Friend
New_Friend=Replace(friend,"|8","") '替换掉所有|8字符为空字符,无论任何位置多少个数
conn.execute"Update [Data] set friend='"&New_Friend&"'"
%>

回答2:

<%
dim New_Friend
New_Friend = Replace(friend & "|","|8|","|")
New_Friend = left(New_Friend, len(New_Friend) - 1)
conn.execute"Update [Data] set friend='"&New_Friend&"'"
%>