SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,340
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How do I integrate Top Downloads or Most Visited stats?

    I heard somewhere that we can use PHP to keep a running total of what content has been asked for from our database. How do you keep a running total based on the page viewed, or on a link clicked on among several links on a page? (That's two different things.) I'd like to implement a Most Viewed or Top 10 Downloads section with this information.

    Counting a page viewed may be misleading when the same page is used as a php template to access and display hundreds of different products. So how do you keep the count restricted to a single item or feature?

    Thanks!

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a column in the pages table named 'page_views' and query that runs on each page view to update the column + 1

  3. #3
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,340
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'll have to think your answer through.

    Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •