How can I add conditions that ‘extend’ from the above relation? So for example a condition that checks ‘accepted=1’ and another condition that checks ‘approved=1’.
Of course I can just create separate relations, but I want to use the above as a ‘base’ relation from where I can simply extend from with different conditions.
Can you see what I mean now. Instead of having those last three relations, I want to be able to just call the first relation and then add on a condition(s) in the call.
I just had a look at scopes - is that how it should be done?
You can either use relational scopes or add the conditions to a critera (for example the constructor of CActiveDataProvider). Did you read this page (especially the topics on the bottom)?