Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Wie schreibe ich eine SQL-Abfrage in Cakephp?

Versuchen Sie dies

$this->Buyer->find('all', array(
'fields' => $arrayOfFields,
'conditions' => array(
    'Buyer.lead_status' => $arrayOfLeadStatus,
    'Buyer.compaign' => $arrayOfCompaign,
    'Buyer.is_put_for_exchange' => 0,
    'Buyer.transaction_type' => 'First Sale',
    'Buyer.propertytype' => 'Residential'   
    ),
'group' => array('Buyer.campaign','Buyer.lead_status'),
'order' => 'Buyer.campaign'
));