Order by field in cakephp
Plese try this
$this->Login->find('all', array( 'order'=>array('FIELD(Login.profile_type, "basic", "premium") DESC')));
You can pass options to the find
method:
$this->Login->find('all', array( 'order' => "FIELD(Login.profile_type, 'Basic', 'Premium') DESC"));
This one is more easy way to order and limit that works fine
$this->set('users', $this->User->find('all', array( 'limit' => 3, 'order' => 'User.created DESC' ) ));