Hi
I am doing a nested AND in a OR, like this:
array('conditions' =>
array(
'OR' => array(
'AND' => array(
'ForloebElements.coach_id' =>
$this->Session->read('user_id'),
'ForloebElements.coach_betalt' => 0
),
'AND' => array(
'ForloebElements.coach2_id' =>
$this->Session->read('user_id'),
'ForloebElements.coach2_betalt' => 0
)
)
)
)
I was hoping for something like
"WHERE ((`ForloebElements`.`coach_id` = $this->Session-
>read('user_id') AND `ForloebElements`.`coach_betalt` = 0) OR
((`ForloebElements`.`coach2_id` = $this->Session->read('user_id') AND
`ForloebElements`.`coach2_betalt` = 0))"
but instead I get only the last part
"WHERE ((`ForloebElements`.`coach2_id` = 5) AND
(`ForloebElements`.`coach2_betalt` = 0))"
What could be the problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---