Exclude from findAllByAttributes

I use this select:


$media = Items::model()->findAllByAttributes(array('hid'=>$id, 'elfogadva'=>1), array('order'=>'CASE type

                                                                                                                WHEN 2 THEN 1

                                                                                                                WHEN 3 THEN 2

                                                                                                                WHEN 1 THEN 3 

                                                                                                            END'));

But i wanna "exclude" this: type != 4. How to modify the code?

Solved!


$media = Items::model()->findAllByAttributes(array('hid'=>$id, 'elfogadva'=>1), array('condition'=>'type!=4', 'order'=>'CASE type

                                                                                                                WHEN 2 THEN 1

                                                                                                                WHEN 3 THEN 2

                                                                                                                WHEN 1 THEN 3 

                                                                                                            END'));