Slightly more efficient way to open the database connections

This commit is contained in:
moodler
2003-01-02 11:34:00 +00:00
parent c030ab7078
commit fa3ba0f6c1
2 changed files with 4 additions and 4 deletions
+3 -2
View File
@@ -16,8 +16,9 @@
/// Connect to the database using adodb
require("$CFG->libdir/adodb/adodb.inc.php"); // Database access functions
ADOLoadCode($CFG->dbtype);
$db = &ADONewConnection();
$db = &ADONewConnection($CFG->dbtype);
if (! $db->PConnect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname)) {
echo "<P><FONT COLOR=RED>The database details specified in config.php are not correct, or the database is down.</P>";
die;