var s:string; begin s := 'where id > 1 '; if CheckBox1.Checked then s := ' and ' + s +'......'; if CheckBox2.Checked then s := ' and ' + s +'......'; if CheckBox3.Checked then s := ' and ' + s +'......'; end;
s := 'where id > 1 '; if CheckBox1.Checked then s := ' and ' + s +'......'; if CheckBox2.Checked then s := ' and ' + s +'......'; if CheckBox3.Checked then s := ' and ' + s +'......';我这里没ID这列,就三个条件中选,呵呵如果有id可能也好办的
var
s:string;
begin
s := 'where id > 1 ';
if CheckBox1.Checked then
s := ' and ' + s +'......';
if CheckBox2.Checked then
s := ' and ' + s +'......';
if CheckBox3.Checked then
s := ' and ' + s +'......';
end;
if CheckBox1.Checked then
s := ' and ' + s +'......';
if CheckBox2.Checked then
s := ' and ' + s +'......';
if CheckBox3.Checked then
s := ' and ' + s +'......';我这里没ID这列,就三个条件中选,呵呵如果有id可能也好办的