Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Passing a database connection

by Spidy (Chaplain)
on Nov 22, 2005 at 21:26 UTC ( [id://510913]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $dbh;
    sub new {
        $dbh = @_;
    }
    
  2. or download this
    # $dbname, $uname, $pword have already been filled in.
    my $dbh = DBI->connect("DBI:mysql:$dbname:localhost","$uname","$pword"
    +);
    
  3. or download this
    Main::new($dbh);
    
  4. or download this
    Can't locate object method "selectrow_array" via package "Main" at Mai
    +n.pm line ***.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://510913]
Approved by kutsu
Front-paged by kutsu
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found