On Jun 14, 9:16 pm, cricket <zijn.digi...@gmail.com> wrote:
>
> ... it works fine. So, I tried Cake's query without the WHERE clause,
> and also without the GROUP BY, but no change. There seems to be some
> problem with the table aliases.

OK, I got it. The problem was how I'd specified the condition. This:

'conditions' => array(
        'Member.country_id' => 'Country.id'
)

results in a query with: ON (`Member`.`country_id` = 'Country.id')

Note that 'Country.id' is inside single quotes, rather than the model
alias and field separately being enclosed with back-ticks.

I changed the find params to:

'conditions' => array(
        'Member.country_id = Country.id'
)

This works fine. Thanks, all, for your time.

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