procedure TForm1.Query1FilterRecord(DataSet: TDataSet;
var Accept: Boolean);
begin
if Query1.Fieldbyname('fieldname').asstring= 'A' then
Accept:=true
else
Accept:=false;
end;
下面是我的一个笨拙的SQL:
select * from letters
where ( parent = 0 and ( subject like "*SearchString*" )
or ( content like "*SearchString*" ) )
'or ( id in ( select parent from letters
where parent <> 0 and content like "*SearchString'*" ) )
[可怜巴巴地说]我还有两个条件没加上去呢!