Re: Most viewed?

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

 



Steve Marquez wrote:
Greetings,

Can any of you point me in the right direction on how to use PHP to create a
most viewed or most clicked articles list? Can it be done with PHP?

Thank you so much,

Steve Marquez
smarquez@xxxxxxxxxxxxxxx

Short answer, yes.

The right direction would be something like this:

In the article table of your db add a 'reads' field or similar. Modify your article display code so that when it loads it increments the reads field for that article.

Now to display the article with the most reads you just query the article table for the max reads or for all articles and sort on reads, etc...

-Shawn

--
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