phím có thể xảy ra theo mặc định, tất cả đều là không bắt buộc:
$params =
array(
'conditions' => array('Model.field' => $thisValue), //array of conditions
'recursive' => 1, //int
//array of field names
'fields' => array('Model.field1', 'DISTINCT Model.field2'),
//string or array defining order
'order' => array('Model.created', 'Model.field3 DESC'),
'group' => array('Model.field'), //fields to GROUP BY
'joins' => array('Join relations here'), // for ex: LEFT JOIN `entities` AS Entity ON `Entity`.`category_id` = `Category`.`id`
'limit' => n, //int
'page' => n, //int
'offset' => n, //int
'callbacks' => true //other possible values are false, 'before', 'after'
);
Query:
$resp = find('all', $params);
debug($resp);
Nguồn
2014-04-02 07:17:27
Bạn có thể cho chúng tôi của bạn Mô hình và mối quan hệ của họ xin vui lòng? Vì điều này sẽ giúp bạn biết các mô hình nào đứng trước và theo dõi nhau trong 'find()' –