Hi,
I'm building a site using cakePHP. I have a working HABTM association working between a Company model and a Category model using a companies_categories table. Each company has many categories and each category has many companies. However, I now need to have stats for the site - how many times each company is clicked per month. I also need to know from within which category the user clicked. I was thinking that maybe I should actually create a model CompanyCategory and use a hasMany association with a model Stat, which would have the CompanyCategory id, the year, the month and the number of clicks. However, I would have to change the default save action to not add another row to the table, but add one to the row that already exists. I'm also not sure how creating the model CompanyCategory would affect my existing HABTM association. Another method could be to just create a Stat model and manually update everything with no formal association, but that rather defeats the purpose of using cakePHP in the first place! Is there an easy way of doing what I am suggesting? Am I missing something? Any advice would be appreciated! Thanks, James --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
