Yii Framework Forum: Sorting - Yii Framework Forum

Jump to content

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

Sorting How to sort the data feched by findbyattributes method Rate Topic: -----

#1 User is offline   Midhun Jose 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 22-January 14

Posted 29 March 2014 - 03:42 AM

How to sort the data feched by findbyattributes method....pls some one help me this is really important
0

#2 User is offline   soulge 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 31-July 10

Posted 29 March 2014 - 04:18 AM

View PostMidhun Jose, on 29 March 2014 - 03:42 AM, said:

How to sort the data feched by findbyattributes method....pls some one help me this is really important



paste your code
0

#3 User is offline   Bogel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 13-April 13

Posted 02 April 2014 - 10:30 AM

Try this one:

$model = Employees::model()->findByAttributes(
        array('department_id'=>1),
        array('order'=>'employee_name')
    );


If it solves your problem, don't forget to mention [SOLVED] at your topic. :)
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