cakephp OR condition

后端 未结 3 1982
失恋的感觉
失恋的感觉 2021-01-07 21:22

Originaly posted on cakephp Q&A but i\'ll put it up here in hope of getting some answers.

I have a bunch of companies that has a status of 0 as default but somet

3条回答
  •  盖世英雄少女心
    2021-01-07 22:13

    You can also fetch record by using following method: put values in an array e.g. $arr=array(1,2);

     $res = $this->Model->find('all', array(                      
            'conditions' =>array('Model.filedname'=>$arr),
            'model.id' => 'desc'
      ));
    

    I hope you will find answer.

提交回复
热议问题