Hi, When doing similar stats in Cake, I prefer to use SQL Views for must of the query work, so that my PHP isn't bloated with loads of nested for loops for complex arrays.
My approach would be to create one or more SQL views that do the queries for totaling over given periods (article_posts_per_month, article_posts_per_year, etc) and the create model classes for them, so all your PHP is much cleaner. To my knowledge, SQL Views are generally quite well performing, especially compared to issuing multiple individual queries, common when using Cake's built in queries for more complex db relationships. Hope that helps, Woody On Feb 6, 4:03 pm, "M" <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to show in a page called for example Archives the > articles posted on a site in the following way: > > January February ... > 2006 189 78 > 2005 ... ... > > The numbers contained in the table's cells are links that will open > the article list. > > Any of you can suggest a way to do it? Let's say for simplicity that > the articles are stored in a single table called article and i can > extracts data by grouping for month(created date) and year (created > date). > > Thanks > > Michele --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
