Jump to content

worldofcarp

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by worldofcarp

  1. The table isn't that big, so these queries shouldn't that expensive, so a little overhead but not that big a deal.  Should put an index on the timestamp column.

     

    But this is strange -- it counts users more than once if they change pages rapidly. Plus DISTINCT's may be expensive. Should use count(distinct ip) at least. Or just cut out the "file" column and use count(*) which is a million times faster.

  2. That function takes seconds as an input.

     

    I think the strtotime($now) where $now=time() might be the problem -- time() returns a timestamp as an integer, strtotime() takes a string representation of a time and automagically converts it into a timestamp. If you pass time() to strtotime() I'm not sure what it will do. Just use time() instead of strtotime(time()).

     

    This page has some good documentation on what strtotime does

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.