Yeah, I always wrote in SQL like:

`id` NOT IN(1,2,3)

but:

NOT `id` IN(1,2,3)

oh well.


On Aug 21, 5:19 pm, teknoid <[EMAIL PROTECTED]> wrote:
> NOT IN is possible, but your syntax is not correct...
>
> See the "NOT" array:http://book.cakephp.org/view/74/complex-find-conditions
>
> On Aug 21, 4:08 pm, starkey <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
>
> > I searched for this without success.  I'm using 1.2 RC2 and I need to
> > run a query like this:
> > $this->execute('delete from table where column not in (1,2,3)');
> > OR
> > $this->deleteAll(array('id'=>'NOT IN (1,2,3)'),false, false);
>
> > The problem is that the execute() returns 'unhandled'.  I traced the
> > code and obviously nate,gwoo, and the gang are far better coders than
> > I because I couldn't figure out why I am getting 'unhandled' back.
>
> > Can someone help me with this, please?
>
> > Related, I am also wondering if it is possible to do something like
> > this (although I haven't tried):
> > $this->find('all',array('conditions'=>array('id'=>'NOT IN (1,2,3)')));
>
> > Thank you!
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to