Yii Search Module

Hello,

I have to give a search functionality, in that there is a dropdown called "STATUS",

which has values like, Leaves, Comp Off and Both,

For the Leaves I doing join between emp and leave,

For Comp off, join between emp and Comp Off, and both of these scenarios are working fine.

But for the Last option that is "Both", I want to do like,

Join betn Emp and Leave UNION Join Betn Emp and Comp Off.

So can anyone help me on this, is this doable in Yii?

You can do whatever you want in Yii.

For example, take a look at CSqlDataProvider

Thnx for the Reply,

Till now i have CActiveDataProvider for other 2 scenarios, so it possible by CActiveDataProvider?

I don’t think so. It is built upon AR, which AFAR does not support unions.

Actually, you can extend CDbCriteria and CDbCommandBuilder (and something else, I suppose) to make it work, but that’s a pain.