28,406
社区成员
发帖
与我相关
我的任务
分享
gongren=request("gongren") '取得字符串的值
set rs=server.createobject("adodb.recordset")
sql="select * from gr_list where unit='工伤'"
rs.open sql,conn,3,3
rcount=rs.recordcount
for h=1 to rcount
result=replace(gongren,request("gongren"),rs("gr_name"),"") '从字符串中去掉工伤的人员名字,
rs.movenext
next
rs.close
set rs=nothing
<%
gongren=request("gongren") '取得字符串的值
gongren="、"&gongren&"、" '前后加上、
set rs=conn.execute("select * from gr_list where unit='工伤'")
do while not rs.eof
gr_name="、"&rs("gr_name")&"、"
gongren=replace(gongren,gr_name,"、") '从字符串中去掉工伤的人员名字
rs.movenext
loop
rs.close
set rs=nothing
if left(gongren,1)="、" then gongren=right(gongren,len(gongren)-1)
if right(gongren,1)="、" then gongren=left(gongren,len(gongren)-1)
response.write gongren
%>