Re: Most popular per month

From: Date: Sat, 12 Jul 2008 21:42:05 +0000
Subject: Re: Most popular per month
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-276710@lists.php.net to get a copy of this message
<snip> .. . $perc50=(img50 int)/$total; You can do it per day, per month, per year, per 28 days, per PMS cycle, per anything you want provided you have the data to do it. </snip> :) this is the part where i am a bit confused actually, can you give me one or two examples and i'll work from there?
What you have to do is get all the pictures viewed for a specific day/time frame (you said this was all tracked in a DB anyways) and then add up all the totals and perform the same calculations using the views all added over the days all added. $img1=img1 int day1 +img1 int day2 +img1 int day3 .... img1 int day30 $total= img1 int day1 +img2 int day 1+img3 int day1 +...img50 int day30 $img1perc= $img1/$total

« previous php.general (#276710) next »