Help for this page

Select Code to Download


  1. or download this
    $self->dbh_config( 'DBI:mysql:'.
                          $self->config_param('mysql.database'),
                          $self->config_param('mysql.username'),
                          $self->config_param('mysql.password'),
                          {RaiseError => 1} );
    
  2. or download this
    # use the same args as DBI->connect();
      $self->dbh_config($data_source, $username, $auth, \%attr);
    
  3. or download this
    $data_source = dbi:DriverName:database=database_name;host=hostname
    
  4. or download this
    my $data_source = 'DBI:mysql:'.
             $self->config_param('mysql.database').':'.
    ...
             $self->config_param('mysql.password'),
             { RaiseError => 1 }
       );
    
  5. or download this
       $dbh = DBI->connect( 
             $data_source,
    ...
             config_param('mysql.password'),
             { RaiseError => 1 }
       );