On Jun 14, 12:30 am, "Dr. Loboto" <[email protected]> wrote:
> public function getActiveCountries()
> {
>         return $this->Country->find(
>                 'list',
>                 array(
>                         'joins' => array(
>                                 array(
>                                         'table' => 'members',
>                                         'alias' => 'Member',
>                                         'type' => 'inner',
>                                         'conditions' =>
> 'Member.country_id = Country.id'
>                                 )
>                         ),
>                         'group' => array('Country.id')
>                 )
>         );
>
> }

Thanks, Doc. That looks more like it. Unfortunately, still no joy: I'm
getting an empty set. I tried the query in a terminal and got 171
warnings:

Warning | 1292 | Truncated incorrect DOUBLE value: 'Country.id'

... which is really strange. Both Country.id and Member.country_id are
tinyint(3) unsigned. I'm checking into this now.

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

Reply via email to