if p_tags<>"" then
tags=split(p_tags,",")
for i=0 to ubound(tags)
set rs=conn.execute("select tagid from tags where name='"&tags(i)&"'")
if rs.eof then
conn.execute("insert into tags (name,addTagStyle) values ('"&tags(i)&"','"&request("nTagStyle")&"')")
tag_t=conn.execute("select top 1 TagID FROM tags ORDER BY TagID DESC")(0)
new_tag=new_tag & tags(i) & ","
new_tagid=new_tagid & tag_t & ","
else
tag_t=rs(0)
end if
conn.execute("insert into taglink (tagid,fid) values ("& tag_t &","& fid &")")
rs.close
if i=ubound(tags) then
tagidlist=tagidlist & tag_t
else
tagidlist=tagidlist & tag_t & ","
end if
next
end if