Re: Most popular per month

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux