<%
set rs=conn.execute("select * from pic where id="&id&"")
if not rs.eof then
ty=rs("type")
else
ty = ""
end if
sql3="select * from pic where type='"&ty&"'"
set rs3=conn.execute(sql3)
%>
<%
set rs=conn.execute("select * from pic where id="&id&"")
set ty=rs("type")
sql3="select * from pic where [type]='"&ty&"'"
set rs3=conn.execute(sql3)
%>