Hey,
'conditions' => array( 'OpportunityCategory.id !=' => 1) That should do it for you. Cheers. On Thu, 15 Jan 2009 05:13:20 -0800 (PST), exo_duz <robin.jul...@gmail.com> wrote: > Hi all, > > Simple question. I want to create a "Does Not Equal To" SQL statement > within the Controller. The SQL statement would just get me back all > data when "OpportunityCategory.id" <> 1. > > $findOtherOpportunities = $this->OpportunityCategory->find('all', array > ( > > 'conditions' => array( > > 'OpportunityCategory.id' => '1' > ), > > 'order' => array( > > 'OpportunityCategory.id ASC', > ) > ) > ); > $this->set('other_opportunities', > $findOtherOpportunities); > > Is there a way to do it using the Model::find function? Or would I > have to create a custom SQL within the model? > > Thanks for your help. > --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---