Yii Framework Forum: Cactiverecord Reurned Result - Yii Framework Forum

Jump to content

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

Cactiverecord Reurned Result Rate Topic: -----

#1 User is offline   Naceur 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 06-February 13
  • Location:Tunisia

  Posted 30 March 2013 - 03:38 AM

I use $rslt = Class::model()->findAll(); for research and I need to display the result table to the test. I use this instruction print_r($rslt['attributes']); but it doesn't worked. It caused an exception
can someone help me plz?
0

#2 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 634
  • Joined: 29-November 08
  • Location:Paris, France

Posted 31 March 2013 - 08:07 AM

Did you noticed that you are posting in the "french" forum ? ...

Je crois bien que findAll() va te renvoyer un tableau d'instances CACtiveRecord ... donc essaye de qqchose comme :

print_r($rslt[0]->getAttributes());


Bien sûr pour que cela marche il faudra qu'au moins un résultat soit renvoyé ...
ciao
8)
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