Hi Lauren,

providing you're using 1.2, a less hacky way would be to use the
Containable behaviour.

$this->Purchase->Behaviors->attach('Containable');

$results = $this->Purchase->find('all', array(
        'conditions'=>array('Purchase.account_id' => $account_id,
'Payment.id' => null),
        'contain'=>array(
                'Payment'=>array('conditions'=>array(
                        'Payment.status'=>'unpaid'
        )))
));

http://book.cakephp.org/view/474/containable

hth

jon


-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

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