inc/database.inc.php
changeset 8 47dd15d8bb8c
parent 4 55ed92aa7cf5
child 13 2ff220cfde13
--- a/inc/database.inc.php	Wed Apr 18 22:48:49 2007 +0000
+++ b/inc/database.inc.php	Sun Apr 22 07:20:09 2007 +0000
@@ -21,7 +21,7 @@
 // $Id: database.inc.php,v 1.3 2002/12/27 02:45:08 azurazu Exp $
 //
 
-require_once("dal.inc.php");
+require_once("MDB2.php");
 
 function dbError($msg)
 {
@@ -35,22 +35,19 @@
         die();
 }
 
-// Setup error handling.
 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'dbError');
 
-//$dsn = "mysql://padev:blapadev@localhost/padev" ;
 $dsn = "$dbdsntype://$dbuser:$dbpass@$dbhost/$dbdatabase";
-$db = DB::connect($dsn);
+$db = MDB2::connect($dsn);
 
-if (DB::isError($db))
+if (MDB2::isError($db))
 {
 	// Error handling should be put.
         error(MYSQL_ERROR_FATAL, $db->getMessage());
 }
 
 // Do an ASSOC fetch. Gives us the ability to use ["id"] fields.
-$db->setFetchMode(DB_FETCHMODE_ASSOC);
-
+$db->setFetchMode(MDB2_FETCHMODE_ASSOC);
 
 /* erase info */
 $mysql_pass = $dsn = '';