Views in total AND views per day

Discussion in 'PHP' started by jambo182, Sep 13, 2007.

  1. #1
    Okay,

    My new site will have an array of music and I'd like to track in a database the plays per day and also total plays. Plays total is relatively easy and I know how to do this, but how would I go about recording plays per day, both on the database side and the programming side. Would this require a separate table in the database.

    Any advice appreciated. I don't need the exact code, just the logic behind how to achieve this which I can't seem to figure out!

    Thanks in advance for any advice.
     
    jambo182, Sep 13, 2007 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    You could add an entry to a database every time an individual song was played. Make sure each entry has a timestamp and then just count the number of entries in the database with the specific time parameters that you want to know.
     
    jestep, Sep 13, 2007 IP