You could consider the counterCache, so that Country will keep count
on how many members are related to it!
Then you could make the condition that Country.member_count > 0

Else you could make the count and cache it for further use.
Enjoy,
   John

On Jun 11, 4:41 pm, cricket <zijn.digi...@gmail.com> wrote:
> Using Cake 1.2.x
>
> Member belongsTo Country
>
> I want to create a select list of countries but only include those
> countries that have at least one Member. The only thing I can think of
> doing is to first select DISTINCT Member.country_id, then do a
> find('list') and pass the first result as a condition. Does anyone
> know of a better method?

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