Hi, I have a model with searchcriterias that can be changed from an admin panel. So depending on the the values in a options-table the searchcriterias can be changed.
In other words, I need to retrieve data in a model from another model, is this possible?
I tried with this in my Person-model(search()-function):
$option = Options::model()->find(array('select'=>'option_1'));
if (empty($this->searchoption))
{
$criteria->params['option_1'] = $option;
}
but it does not work.
Is it better to send the data from the controller to the model in some way?
Ideas?