Yii Framework Forum: Pull Only One Field In Relations - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Pull Only One Field In Relations Rate Topic: -----

#1 User is offline   TeAmEr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 05-September 12

Posted 11 September 2012 - 02:34 AM

Hi guys ,
i have this in my Product model relations
'title'=>array(self::HAS_ONE, 'ContentTypeMedia',  array('nid' => 'nid'),'on'=>'field_media_general_lang_value='.$language),


but when i need to print the title i use
echo $product->title["title_column"];


anyway to be able to use it like
echo $product->title


as from title model i will be using only one column !
Thank you
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users