Model->findBySql($sql) -- Anggie Bratadinata www.masputih.com I N D O N E S I A
Barma3 wrote: > Could somebody tell me how to use Cake's model for this query: > > SELECT tmp_table.mfr, COUNT(item_sale.mfr) as count FROM (SELECT > DISTINCT mfr FROM item) tmp_table LEFT JOIN item_sale ON tmp_table.mfr > = item_sale.mfr GROUP BY tmp_table.mfr > > I have two tables. First for items, second for posts. Finally I need a > list of items from first table with a number of posts from second > table. > > Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
