SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict betrollwin.com's Avatar
    Join Date
    Nov 2005
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow Get entries for past 24 hours

    I've been searching for hours and can't seem to find the answer. I currently have a page that each time a user visits it, the pageid and timestamp is thrown into a mysql daabase.

    so the database looks like so:
    linkid time
    3 2007-08-22 17:26:21
    3 2007-08-20 17:26:21
    3 2007-08-22 18:36:59
    2 2007-08-22 18:37:21

    What i need is for php to show the total amount of visits today as per a certain time zone (or if thats not possible, the past 24 hours)

    soo..
    Search for all occurrences where linkid = 3 today for a specific timezone (or 24 hours)

    thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Location
    New York
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you cant find a server stats program that does this? or maybe im confused

  3. #3
    SitePoint Addict betrollwin.com's Avatar
    Join Date
    Nov 2005
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let me get a little more detailed

    User 1: Lives in New York (EST -5)
    registers for my site and sends visitors to his linkid (3)

    After two days, this is what the mysql table looks like:
    linkid time
    3 -=- 2007-08-22 17:26:21
    3 -=- 2007-08-20 17:26:21
    3 -=- 2007-08-22 18:36:59

    But mysql time isn't Eastern time, its another timezone. So when a visitor comes to user1's page at 3pm EST, mysql registers the time as 2007-08-22 17:26:21

    So... I want to first add/subtract the number of numbers in the mysql database depending upon the user, and then see the amount of visitors for the day.


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
  •