I found the following code:
<?php echo CHtml::activeDropDownList($model, 'catid', CHtml::listData( Category::model()->findAll(), 'id', 'catname' ) ); ?>
And it works perfectly. But it displays a dropdown menu when I only want to show a single text result, so I tried this:
<?php echo Category::model()->find(array(
'select'=>'catname',
'condition'=>'catid=:catid',
'params'=>array(':catid'=>'42'),
));
?>But get the error: Object of class Category could not be converted to string
How can this be done? Am I doing find() the right way?

Help














