|
The hook The standard implementation of this hook causes the database connection to be made using the parameters set up in the Pedserve configuration file ( We expect that most users will not need to alter this hook.
# Connect to database, returning DBI handle.
# Or, fatal error if that fails.
#
# OPTIONAL
# Arg 1 - reference to map for future additional arguments; possibly undefined
sub hookDatabase_Connect {
my ($rmArgsEx) = @_;
# The example just shows a vanilla database connection being made
# using the parameters set up in pedserve-customize-sys.pl.
my $hDBI = DBI->connect(
"dbi:mysql:database=$::custom_strDbName:$::custom_strDbHost",
$::custom_strDbUser, $::custom_strDbPass);
if (!defined($hDBI)) {
&pdsFatal('db connection error');
}
return $hDBI;
}
|
USEFUL LINKS: |
©1996-2009
Tenset Tech. Ltd
All Rights Reserved