문제

So problem fixed like this. (About find with divide fields) Need use virtualFields. In model:

class User extends AppModel{
    public $virtualFields = array(
    'ORDER_KD' => 'User.field1 / User.field2'
);

In controller:

$this->User->find('all', array(
             ...//some conditions etc...
             'order'=> array(
                 "ORDER_KD" => 'desc'), //virtualField
             'limit' => 15                
         ));

Thanks kicaj

도움이 되었습니까?

해결책

You can use virtualFields, because order field / field is used as db column name.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top