CakePHP Find Conditions
Copy this code and paste it in your HTML
'conditions' => array('Model.field' => $thisValue), //array of conditions 'recursive' => 1, //int
'fields' => array('Model.field1', 'DISTINCT Model.field2'), //array of field names 'order' => array('Model.created', 'Model.field3 DESC'), //string or array defining order 'joins' => array(), // array of arrays defining join operations 'group' => array('Model.field'), //fields to GROUP BY 'limit' => n, //int
'page' => n, //int
'offset'=> n, //int
'callbacks' => true //other possible values are false, 'before', 'after'
)
URL: http://book.cakephp.org/view/73/Retrieving-Your-Data
Report this snippet
Comments
Subscribe to comments