I just observed that your ON part of the JOIN statement has Country.id in single brackets! Check your code, maybe that is the issue! Enjoy, John
On Jun 14, 10:07 pm, cricket <[email protected]> wrote: > On Jun 14, 11:23 am, calvin <[email protected]> wrote: > > > Ah, good call WebbedIT. I don't know how I missed that. Actually, I'm > > pretty sure I've read that part of the Cookbook but just forgot about > > it when I wrote that post. I've added 'joins' to the available find > > parameters/keys list and added a link to the "Joining tables" section. > > Thanks for the update. > > > cricket: > > Sorry, I haven't had time to actually try that query myself, but I'd > > give Dr. Loboto's code a shot and see if using the 'conditions' param > > rather than 'foreignKey' works. Let us know if that works for you. > > No joy. I forgot to mention, in my other reply to Dr. Loboto, that I > tried the query with and without the foreignKey option. I get the same > query either way and it looks correct to me. > > SELECT `Country`.`id`, `Country`.`name` FROM `countries` AS `Country` > inner JOIN members AS `Member` ON (`Member`.`country_id` = > 'Country.id') WHERE 1 = 1 GROUP BY `Country`.`id` 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
