Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006

    Question Unanswered: Looking for direction

    Hello all,

    I am new to PHP so I was hoping someone could provide me with some direction. I am creating a statistics page for a customer of mine, I know how to retrieve the data I need but this is what I am not sure how to do. All of the stats for the current month are updated every X hours but the stats from the months prior do not change, any suggestions on how i should go about storing those so i dont have to query the database just to retrieve the results?? Any help would be appreciated, a simple link to an example would be greatly appreciated.


    Tom (PHP Newbie)

  2. #2
    Join Date
    Jan 2005
    if you are talking about the previous month's stats you could write them out to an array in a file. it would probably be easier to just query the db, but if you are concerned about traffic this could be a good way to go

  3. #3
    Join Date
    Oct 2005
    where do you want to go?

  4. #4
    Join Date
    May 2006
    When a month closes, could you just create a static HTML page which can be served on demand ? It could be faster than fetching the data ( from array or db) and rendering on demand.

  5. #5
    Join Date
    Oct 2002
    Plymouth UK
    Sounds to me like you require to an archive or warehouse type of database for summary stats of previous months. Where stats are built and written to the database at the end of each significant period (month). These can then be retrieved when required rather than having to be assembled. The stats for the current month would need to be retrieved and assembled in the same way as you are at the moment.

    Depending on the database platform the warehousing of the summary data could be automated by scheduled tasks within the database.
    Last edited by gannet; 05-24-06 at 03:32.

Posting Permissions

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