Yii Framework Forum: How Access Into Fields After Join? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How Access Into Fields After Join?

#1 User is offline   n-r 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 102
  • Joined: 19-April 13

Posted 02 May 2013 - 01:42 AM

hi
how access into fields after join??

 $a=  User::model()->with('tels')->findAll("tels.acc=:a",array(':a'=>'0'));

               foreach($a as $B)
               {
                   //echo $b;
                 
               }


$b is showing property of User, no Tel!!
thank you
0

#2 User is offline   n-r 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 102
  • Joined: 19-April 13

Posted 02 May 2013 - 01:56 AM

View Postn-r, on 02 May 2013 - 01:42 AM, said:

hi
how access into fields after join??

 $a=  User::model()->with('tels')->findAll("tels.acc=:a",array(':a'=>'0'));

               foreach($a as $B)
               {
                   //echo $b;
                 
               }


$b is showing property of User, no Tel!!
thank you



hi
i'm finding:
echo $b->tels['0']['tel'];

tel is field name
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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