realtime filtering

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ben
Posts: 119
Joined: Wed 17 Nov 2004 19:48

realtime filtering

Post by ben » Sun 19 Mar 2006 22:41

i have a table with 1000 records and a MyQuery that
SELECT *... LEFT JOIN....GROUP BY... etc

The result table is 500 tables.

I have a checkbox "[ ] Filtering"
and when user check it or not I want to filter all records that a field is equal to a number like. What Im doing now is:

Query.Filter := 'userid = 2';
Query.Filetered := Checkbox1.Checked;

is this the best way or you suggest another better?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 20 Mar 2006 09:32

The solution you have chosen is the best in you case.

Post Reply