先把CC数组按" or "串连成字符串 itemtj itemtj="pid=2 or pid=124 or pid=125 or pid=126 or pid=134" 再执行以下代码: cc=Split(trim(itemtj)," or ") '-----------修剪条件------------- for i=0 to ubound(cc) if instr(itemtj,cc(i))=1 then itemtj=replace(itemtj,"or "&trim(cc(i)),"") else itemtj=replace(itemtj,"or "&trim(cc(i)),"")&" or "&cc(i) end if
next
即得到: pid=2 or pid=124 or pid=125 or pid=126 or pid=134