Hi!
I have this code:
debug(
$this->User->find('all',
array(
'conditions' => array(
'active' => 1,
'class' => 2
),
'contain' => Array(
'Chatuser' => Array(
'conditions' =>
array('Chatuser.id_user !=' => '0')
)
),
'fields' => Array(
'id_user', 'apelido'
)
)
)
);
It returns this:
[121] => Array
(
[User] => Array
(
[id_user] => 1085
[apelido] => Anna Maria Votta
)
[Chatuser] => Array
(
)
)
[122] => Array
(
[User] => Array
(
[id_user] => 1088
[apelido] => Alba Correia
)
[Chatuser] => Array
(
[0] => Array
(
[id] => 1
[id_user] => 1088
[id_incorp_enterprises] => 19
)
[1] => Array
(
[id] => 3
[id_user] => 1088
[id_incorp_enterprises] => 20
)
)
)
What should I do for the containable behaviour to prevent returning
the 121 line, which has empty result set to Chatuser?
Thanks for the help!
Dérico Filho
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
