Theres a problem with that however...it assumes you use mySQL.  I use Oracle, and it 
doesn't provide that functionality; you need to alter the INSERT or UPDATE statements 
to include passing a SYSDATE into the timestamp field.  'Course, you could create a 
trigger that adds the SYSDATE after an insert or update, but thats not really 
elegant...and PL_SQL really sucks (warning...flamebait)

-man

-----Original Message-----
From: Richard Dice [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 01, 2000 4:31 PM
To: Adam Cassar
Cc: [EMAIL PROTECTED]
Subject: Re: cleaning old Apache::Session's


> I was wondering how people are clearing out old Apache::Session's
> 
> No timestamp is used on the fields used by Apache::Session, so how do
> we clear the old sessions?
> 
> I am not talking about the delete() method to remove a session, as that
> presumes that a user will always leave your site via pre-defined access
> points.

This is how I handle it...

Your 'sessions' table schema has to have _at least_ the columns in it that
are talked about in the Apache::Session documentation.  That doesn't mean
that you can't add on your own timestamp column as well.  Your program
can use that as a basis upon which to delete rows.

Cheers,
Richard

----------------------------------------------------------------------------
 Richard Dice * Personal 514 816 9568 * Fax 514 816 9569
 ShadNet Creator * http://shadnet.shad.ca/ * [EMAIL PROTECTED]
 Occasional Writer, HotWired * http://www.hotwired.com/webmonkey/
     "squeeze the world 'til it's small enough to join us heel to toe"
         - jesus jones

Reply via email to