Thanks...i will give that a go. Y
our right in your reply with the sub_query after looking at what I was
trying.

Dave

-----Original Message-----
From: Mattijs [mailto:mattijsmeib...@hotmail.com] 
Sent: November-13-10 6:37 AM
To: CakePHP
Subject: Re: Help with Joins

You are actually joining records in your example, while you want the
records without a join. You could use a subquery with NOT IN instead:

SELECT * FROM Offers WHERE Offer.id NOT IN (SELECT Reject.offer_id
FROM Rejects WHERE Reject.profile_id =
'4b4ff09c-2580-4e21-9dbf-36b74adcd75b')



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to