my ($sess_id) = @_; my $cgi = new CGI; my $dbh = DBI->connect( "$dbms:$dbname","$dbuser","$dbpasswd", {PrintError => 0, RaiseError => 1}) || die "Verbindung zur Datenbank fehlgeschlagen: $DBI::errstr"; $sid = $cgi->cookie('YAMBE_SESSID') || $cgi->param('YAMBE_SESSID') || $sess_id || undef; my $sql = qq{SELECT id FROM ${table_prefix}session WHERE id like $sid}; my $sth = $dbh->prepare( $sql ); $sth->execute();