SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    ? big bad opus's Avatar
    Join Date
    Jun 2001
    Location
    DC
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    me so stupid - please help

    okay check it. I have an audio archive on my site that is database driven. i have it set up so it counts each time a song is played. all of this works rather smoothly.

    the problem is i want the "count" field to go back to 0 a the beginning of each month. anyone got any ideas?

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can either do it manually or setup a cron job to run a perl script or cgi-mode php script.
    ck :: bringing chris to the masses.

  3. #3
    ? big bad opus's Avatar
    Join Date
    Jun 2001
    Location
    DC
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i guess cron job is the way to go but i how do setup a cron job?

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will need to know if CRON is supported by your host first

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Wolverhampton, UK
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    couldn't u also do it so that u have in ur db, the last time songs were played etc, + when the month on the db, is one behind that of the current one, ie when sum1 selects a song the next month, it sees this + resets the count thing...

    hope that makes some sense
    beachball

  6. #6
    ? big bad opus's Avatar
    Join Date
    Jun 2001
    Location
    DC
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by beachball
    couldn't u also do it so that u have in ur db, the last time songs were played etc, + when the month on the db, is one behind that of the current one, ie when sum1 selects a song the next month, it sees this + resets the count thing...

    hope that makes some sense
    beachball
    huh?


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
  •