On Dec 8, 4:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Thanks Adrian, this works:
> $userid=1;
> $this->set('notes', $this->Note->findAll("global = 1 OR user_id =
> $userid"));
As a constraint that would be:
$condition['OR']['Note.global'] = true;
$condition['OR']['Note.user_id'] = $userid; // Although it's probably
cleaner to put $condition['OR']['User.id'] = $userid;
$notes = $this->Note->findAll($conditions);
$this->set('notes',$notes);
HTH,
AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :) You may get your answer quicker by asking on
the IRC Channel (you can access it with just a browser
here:http://irc.cakephp.org).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Cake PHP" 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
-~----------~----~----~----~------~----~------~--~---