Parametrised Scope Within A Normal Scope?

I want to use a parametrised scope within a normal scope but can’t get it working

For example:

If I have this scope called "isEligibleForStats":


     * @return array scopes


    public function scopes()


        return array(


                'condition'=>"transmission_started_at > '".date('Y-m-d H:i:s',strtotime('-10 days'))."'",





Where the "ofStatus" named parameterized scope is:

    public function ofStatus($status)


        $criteria = new CDbCriteria;

        $criteria->compare('status', $status);


        return $this;


and I do


The SQL produced by Yii is

SELECT * FROM `blah` `t` WHERE transmission_started_at > '2013-06-03 09:53:31'

The SQL doesn’t have the where clause I wanted from the “ofStatus” scope (AND status = ‘Sent’).

Have I got the wrong syntax or is it just not possible to use a parameterised scope within a normal scope?

I did try some different syntaxes, without luck:





I think beforeFind() is more apt