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 [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
-~----------~----~----~----~------~----~------~--~---