Hi everybody, I started to use yii a few weeks ago and it seems to be very nice!
I found out quiete a lot on my own, but now I have a problem I couldn’t find a solution.
In my mysql database are two tables, one is a link table where I store a link together with an link_id.
In the other table I store the overall clicks (not of the day, but added) on the link. So the table has three columns: count, timestamp and link_id.
I use a CGridView to display the content of the link table. Right now it just displays the link and the link_id, but I want to add the growth of the clicks in the periods of 3, 7 and 30 days to the view. Where can i tell the CGridView or the model that it should load the 4 click counts and calculate the growth out of it? ((3DaysAgoClicks / todayClicks) * 100) Does it make sense to calculate this? or should I create an extra table where I store these information? I have up to 1000 links which get clicked quiete a lot and the overview page is also clicked pretty often…