Hi
All i am new in yii and need some help
i wrote a function
public function getCateygoryList()
{
$c= new CDbCriteria;
$c->select = 'catId, catName';
$c->from = 'af_categories';
$c->order = 'catName ASC';
$category = Categories::model()->findAllByPk($c);
return $category;
}
in category model when i call this function to property form to create category dropdown list like
<div class="row">
<?php echo $form->labelEx($model,'fkcategroyid'); ?>
<?php /*?><?php echo $form->textField($model,'fkcategroyid'); ?><?php */?>
<?php echo $form->dropDownList($model,'fkcategroyid', $model->categories->getCateygoryList()); ?>
<?php echo $form->error($model,'fkcategroyid'); ?>
</div>
it show error
Property "Tblproperty.categories" is not defined.
Thanks in advance.