For example a "user" has many property, like username, email, nick, active, privilege and so on. And I want to filter the records with a keyword and active status (only two vaule, YES and NO).
If 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.
If active = 'YES' , it should filter the records with that conditions....
How to build this conditons??