Line 140... |
Line 140... |
140 |
}
|
140 |
}
|
141 |
|
141 |
|
142 |
my $configuration = &loadConfig( $confFileName, @searchPaths );
|
142 |
my $configuration = &loadConfig( $confFileName, @searchPaths );
|
143 |
die "Could not find configuration file $confFileName in " . join( ', ', @searchPaths) . "\n" unless $configuration;
|
143 |
die "Could not find configuration file $confFileName in " . join( ', ', @searchPaths) . "\n" unless $configuration;
|
144 |
|
144 |
|
- |
|
145 |
#print 'DBI:mysql:database=' . $$configuration{'database'}{'database'} . ';host=' . $$configuration{'database'}{'databaseServer'} . "\n" . $$configuration{'database'}{'databaseUsername'}. "\n" . $$configuration{'database'}{'databasePassword'} . "\n";
|
145 |
my $dbh = DBI->connect('DBI:mysql:' . $$configuration{'database'}{'database'},
|
146 |
my $dbh = DBI->connect('DBI:mysql:database=' . $$configuration{'database'}{'database'} . ';host=' . $$configuration{'database'}{'databaseServer'},
|
146 |
$$configuration{'database'}{'databaseUsername'},
|
147 |
$$configuration{'database'}{'databaseUsername'},
|
147 |
$$configuration{'database'}{'databasePassword'} )
|
148 |
$$configuration{'database'}{'databasePassword'} )
|
148 |
|| die "Could not connect to database: $DBI::errstr";
|
149 |
|| die "Could not connect to database: $DBI::errstr";
|
149 |
|
150 |
|
150 |
my $sth = $dbh->prepare( $count );
|
151 |
my $sth = $dbh->prepare( $count );
|