var<br> s:string;<br>begin<br> s:='select * from 表 where 1=1';<br> if trim(edit1.text)<>'' then<br> s:=s+trim(edit1.text);<br> if trim(edit2.text)<>'' then<br> s:=s+trim(edit2.text);<br> if trim(edit3.text)<>'' then<br> s:=s+trim(edit3.text);<br> if trim(edit4.text)<>'' then<br> s:=s+trim(edit4.text);<br> if trim(edit5.text)<>'' then<br> s:=s+trim(edit5.text);<br> adoquery1.close;<br> adoquery1.sql.text:=s;<br> adoquery1.open;