// // // ///////////////////////////////////////////////////////////////// // $Id$ // PEAR::DB //require_once("DB.php"); // //$db = DB::Connect(DSN); //DB::isError($db) and die($db->getMessage()); // //$db->setErrorHandling(PEAR_ERROR_CALLBACK, "dbError"); // // //function dbError($errObj) { // $msg = "Error! [$err_obj->code] $err_obj->userinfo"; // echo $msg; // $this->m_Logger->logErr($msg); //} // PEAR::MDB2 require_once 'MDB2.php'; // uses MDB2::factory() to create the instance // and also attempts to connect to the host $mdb2 =& MDB2::connect(DSN, $MDB2_options); if (PEAR::isError($mdb2)) { die($mdb2->getMessage()); } //if (!@ mysql_connect($DB_host, $DB_user, $DB_pass)) { // echo "

" . _("Could not connect to the database!") . "

"; // die(); //} //mysql_select_db($DB_name); ?>