Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: DB Connection using CGI::Application

by scorpio17 (Canon)
on Apr 24, 2013 at 21:53 UTC ( [id://1030543]=note: print w/replies, xml ) Need Help??


in reply to DB Connection using CGI::Application

You need to be using CGI::Application::Plugin::DBH, if you're not already, then do something like this:

sub cgiapp_init { my $self = shift; ... $self->dbh_config('mydbh', [$dsn1, $user1, $pass1, \%options1,]); $self->dbh_config('mydbh400', [$dsn2, $user2, $pass2, \%options2,]); } sub one { my $self = shift; my $dbh = $self->dbh('mydbh'); ... } sub two { my $self = shift; my $dbh = $self->dbh('mydbh400'); ... }

Replies are listed 'Best First'.
Re^2: DB Connection using CGI::Application
by Anonymous Monk on Apr 25, 2013 at 03:41 UTC

    You need to be using ...

    param will work, plugins aren't mandatory

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1030543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-23 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found