try:
'OR' => array (
'User.name IS' => 'NULL',
'Recipe.id IS' => ' NULL'
)
);
---------------
$this->paginate['conditions'] = array(
'OR' => array (
'User.name IS' => null,
'Recipe.id IS' => null
)
);
'OR' => array (
'User.name IS' => null,
'Recipe.id IS' => null
)
);
----------------
$this->paginate['conditions'] = array(
'OR' => array (
'User.name' => null,
'Recipe.id' => null
)
);
'OR' => array (
'User.name' => null,
'Recipe.id' => null
)
);
Jaydeep Dave
--
Regards,
Jaydeep Dave
Mobile: +919898456445
Email: jaydipdave@yahoo.com
On Mon, Jul 27, 2009 at 12:33 PM, byqsri <marco.rizzetto@gmail.com> wrote:
It doesnt work.
The resulted query is :
`User`.`name` = 'IS NULL'
> > Thank you.- Nascondi testo citato
On 27 Lug, 04:30, "Dr. Loboto" <drLob...@gmail.com> wrote:
> Probably something like this:
>
> $this->paginate['conditions'] = array(
> 'OR' => array (
> 'User.name' => 'IS NULL',
> 'Recipe.id' => 'IS NULL'
> )
> );
>
> On Jul 24, 2:32 am, iFeghali <igor.fegh...@gmail.com> wrote:
>
>
>
> > Hello All,
>
> > Say I have a User hasMany Recipes. Now I want to search for all users
> > with an empty name OR users that doesn't have any recipe. How do I
> > turn that piece of code in what I want:
>
> > $this->paginate['conditions'] = array('User.name' => 'IS NULL');
> > $this->set('users', $this->paginate());
>
> > Can I do that in a single query condition ?
>
>
> - Mostra testo citato -
--
Regards,
Jaydeep Dave
Mobile: +919898456445
Email: jaydipdave@yahoo.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment