You may want to check this thread: http://groups.google.ch/group/cake-php/browse_thread/thread/308ea201394f235c/dcf614689114db68
On May 18, 9:06 am, buzznut <[EMAIL PROTECTED]> wrote: > It looks like the GROUP BY in the left join statement is causing the > problem. The following query works and returns the results I want, but > doesn't use Cake magic to make it work. > > SELECT `Project`.`id`, count(`Task`.`project_id`) FROM `projects` AS > `Project` LEFT JOIN `tasks` AS `Task` ON (`Project`.`company_id`= `3` > AND `Task`.`project_id` = `Project`.`id`) > WHERE `Project`.`company_id`= `3` GROUP BY `Task`.`project_id` --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
