CakePHP Find Conditions


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. 'conditions' => array('Model.field' => $thisValue), //array of conditions
  2. 'recursive' => 1, //int
  3. 'fields' => array('Model.field1', 'DISTINCT Model.field2'), //array of field names
  4. 'order' => array('Model.created', 'Model.field3 DESC'), //string or array defining order
  5. 'joins' => array(), // array of arrays defining join operations
  6. 'group' => array('Model.field'), //fields to GROUP BY
  7. 'limit' => n, //int
  8. 'page' => n, //int
  9. 'offset'=> n, //int
  10. 'callbacks' => true //other possible values are false, 'before', 'after'
  11. )

URL: http://book.cakephp.org/view/73/Retrieving-Your-Data

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.