Affiliate::search PHP Method

    public function search()
    {
        // Warning: Please modify the following code to remove attributes that
        // should not be searched.
        $criteria = new CDbCriteria();
        $criteria->compare('affiliate_id', $this->affiliate_id);
        $criteria->compare('firstname', $this->firstname, true);
        $criteria->compare('lastname', $this->lastname, true);
        $criteria->compare('email', $this->email, true);
        $criteria->compare('telephone', $this->telephone, true);
        $criteria->compare('fax', $this->fax, true);
        $criteria->compare('password', $this->password, true);
        $criteria->compare('salt', $this->salt, true);
        $criteria->compare('company', $this->company, true);
        $criteria->compare('website', $this->website, true);
        $criteria->compare('address_1', $this->address_1, true);
        $criteria->compare('address_2', $this->address_2, true);
        $criteria->compare('city', $this->city, true);
        $criteria->compare('postcode', $this->postcode, true);
        $criteria->compare('country_id', $this->country_id);
        $criteria->compare('zone_id', $this->zone_id);
        $criteria->compare('code', $this->code, true);
        $criteria->compare('commission', $this->commission, true);
        $criteria->compare('tax', $this->tax, true);
        $criteria->compare('payment', $this->payment, true);
        $criteria->compare('cheque', $this->cheque, true);
        $criteria->compare('paypal', $this->paypal, true);
        $criteria->compare('bank_name', $this->bank_name, true);
        $criteria->compare('bank_branch_number', $this->bank_branch_number, true);
        $criteria->compare('bank_swift_code', $this->bank_swift_code, true);
        $criteria->compare('bank_account_name', $this->bank_account_name, true);
        $criteria->compare('bank_account_number', $this->bank_account_number, true);
        $criteria->compare('ip', $this->ip, true);
        $criteria->compare('status', $this->status);
        $criteria->compare('approved', $this->approved);
        $criteria->compare('date_added', $this->date_added, true);
        return new CActiveDataProvider($this, array('criteria' => $criteria));
    }