Enter life-time rule for rows in a table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luttkens
    New Member
    • Jul 2007
    • 23

    Enter life-time rule for rows in a table

    I'm gonna keep track of all uniqe visitor on a web page and therefore I need to store all visitors IP-number. Each IP-number is only counted as a visit if its on diffrent days. So the IPs will be saved for 24 hours.

    Is there a way to automaticly delete rows after 24 hours in a table?
  • coolsti
    Contributor
    • Mar 2008
    • 310

    #2
    Do you have the ability to run a script that can access your database? And set up this script so that it runs automatically once each night?

    If that is the case, then you can just perform a delete query once each night, say at midnight, to clear out all the rows in the table that stores these IP addresses. Then you would be starting fresh again each day.

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      i don't think keeping track of the IP is not a good idea to find out the list of visitors. It might happen that from a single IP multiple visits visit the page. Like from a office network of cafe.

      Comment

      Working...