Searching for 2 days and found nothing =(

How i can build this SQL code:
SELECT `m1`.`id`, COUNT(`m2`.`id`) as cnt
FROM `m1` LEFT JOIN `m2` ON (`m1`.`id` = `m2`.`m1_id`) WHERE 1=1
GROUP BY `m2`.`m1_id`
ORDER BY `m1`.`id`

is it real without custom Model->query() ?

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