version 1.6, 2002/08/12 14:50:18
|
version 1.7, 2002/08/21 21:29:51
|
Line 327 sub connect_to_db {
|
Line 327 sub connect_to_db {
|
$Apache::lonnet::perlvar{'lonSqlAccess'}, |
$Apache::lonnet::perlvar{'lonSqlAccess'}, |
{ RaiseError=>0,PrintError=>0}))) { |
{ RaiseError=>0,PrintError=>0}))) { |
$debugstring = "Unable to connect to loncapa database."; |
$debugstring = "Unable to connect to loncapa database."; |
if ($dbh->err) { |
if (! defined($dbh)) { |
|
$debugstring = "Unable to connect to loncapa database."; |
|
$errorstring = "dbh was undefined."; |
|
} elsif ($dbh->err) { |
$errorstring = "Connection error: ".$dbh->errstr; |
$errorstring = "Connection error: ".$dbh->errstr; |
} |
} |
return undef; |
return undef; |