I am trying to create a if then statement to only display something if a value in a array exists.
Given two tables Address and Player I have the following relation
'displayAddress' => array(self::HAS_MANY, 'Address', 'PlayerId',
'condition'=>array('IsHome=:home', 'IsWork=:wok'),
'params' => array(':hom'=>'Y', ':wok'=>'N')),
Now in a Player view I want to check to see if that player has any addresses where it is only their home and not their work.
I have tried setting a function for the array and checking doing isset in the view as well as in_array() and array_key_exists() but I haven't been able to solve it.