spx2 has asked for the wisdom of the Perl Monks concerning the following question:
3 use CGI qw/:standard/; 4 use CGI::Session; 5 use Data::Dumper; 6 use DBI; 7 my $session = new CGI::Session(); 8 9 my $dbh; 10 if($session->param('dbh')) { 11 $dbh = $session->param('dbh'); 12 } else { 13 $dbh = DBI->connect("dbi:mysql...connection_string_continues_h +ere"); 14 $session->param('dbh',$dbh); 15 $session->save_param(); 16 $session->flush; 17 };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: storing DBI database handle in CGI::Session object ?
by perrin (Chancellor) on Feb 13, 2008 at 00:44 UTC | |
by spx2 (Deacon) on Feb 13, 2008 at 01:01 UTC | |
by perrin (Chancellor) on Feb 13, 2008 at 01:41 UTC | |
by kirillm (Friar) on Feb 15, 2008 at 11:31 UTC | |
|
Re: storing DBI database handle in CGI::Session object ?
by runrig (Abbot) on Feb 13, 2008 at 00:50 UTC |