Help for this page

Select Code to Download


  1. or download this
    $dbHandle = DBI->connect('DBI:mysql:mydb','ID','pw');
    
  2. or download this
    
    my $dbh = DBI->connect("DBI:mysql:database=dbname;host=host", "$id","$
    +pw") || die "Can't connect: $DBI::errstr";
    
  3. or download this
    
    #!/usr/bin/perl -wT
    ...
    #Make sure you clean up when finished:
    $sth->finish();
    $dbh->disconnect();