Closed brunokimuramon closed 11 years ago
$this->DataTable->settings['scope'] = array();
and $this->DataTable->settings['conditions'] = array();
Thanks, i used and it works:
$this->DataTable->settings['Task'] = array(
'conditions' => array(
...
),
);
Now, i have associations defined in models and i want use "recursive = 1", how can i do it? Thanks again.
Just set it after the conditions key.
Thanks! it works!
No problem
I am trying to use condition based on if conditions.. but not working... no errors but the conditions is not working. what seems to be the problem? thanks.
//not working public function summary($biller_id = null) {
if(!empty($biller_id)){
$this->DataTable->settings['conditions'] = array('BillsTransaction.biller_id' => $biller_id);
}
}
//working public function summary() {
$this->DataTable->settings['conditions'] = array('BillsTransaction.biller_id' => 1);
}
my code:
I need put condition in my query, how can i do?