actually, i want to meet this sql requirement:
… where (type_id = 6 OR type_id = 8) and status = 2 ….
but i don NOT know how to set conditions in $paginate.
var $paginate = array(
'Student'=>array(
'limit' => 10,
'fields'=>array('Student.id','Student.firstname','Student.lastname'),
'order' =>array('Student.id'=>'desc'),
'conditions' => ?,
),
);
any one knows how to set conditions ?
Based on this site http://book.cakephp.org/1.3/view/1030/Complex-Find-Conditions
(It’s not the lastes release, but try it)
or
EDIT: This second version cannot be used in this situation, because now the OR array have two elements with the same keys and will check only the last (8)
[N.B.] Excuse me if I made some syntax error 🙂