Help for this page

Select Code to Download


  1. or download this
    CREATE TABLE sessions (
            id CHAR(32) NOT NULL UNIQUE,
            a_session TEXT NOT NULL,
            expires int unsigned NOT NULL
        );
    
  2. or download this
    sub store {
        my ($self, $sid, $options, $data) = @_;   
    ...
        
        return $dbh->selectrow_array(qq|SELECT RELEASE_LOCK("$sid")|);
    }
    
  3. or download this
    $dbh->do("delete from sessions where expires<?",undef,time());