Posted By

kwanhon on 07/07/10


Tagged

php cakephp


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Vordreller
hmvrulz


CakePHP Find Conditions


 / Published in: PHP
 

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

  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. )

Report this snippet  

You need to login to post a comment.