For example a "user" has many property, like
privilege and so on. And I want to filter the records with a
active status (only two vaule, YES and NO).
keyword is not null, it should filter the records with
username like '%keyword%' or email like %keyword%, if it's null, it should show all the records with other conditions.
active = 'YES' , it should filter the records with that conditions....
How to build this conditons??