Example #1
0
		{
			// load 'explain' database class
			require_once(DIR . '/includes/class_database_explain.php');
			$db = new vB_Database_MySQLi_Explain($vbulletin);
		}
		else
		{
			$db = new vB_Database_MySQLi($vbulletin);
		}
		break;
	}

	case 'mysqli_slave':
	{
		require_once(DIR . '/includes/class_database_slave.php');
		$db = new vB_Database_Slave_MySQLi($vbulletin);
		break;
	}

	// load extended, non MySQL class
	default:
	{
	// this is not implemented fully yet
	//	$db = 'vB_Database_' . $vbulletin->config['Database']['dbtype'];
	//	$db = new $db($vbulletin);
		die('Fatal error: Database class not found');
	}
}


// get core functions
Example #2
0
        $db = new vB_Database_Slave($vbulletin);
        break;
        // Load MySQLi class
    // Load MySQLi class
    case 'mysqli':
        if ($vbulletin->debug and ($vbulletin->input->clean_gpc('r', 'explain', TYPE_UINT) or defined('POST_EXPLAIN') and !empty($_POST))) {
            // load 'explain' database class
            require_once DIR . '/includes/class_database_explain.php';
            $db = new vB_Database_MySQLi_Explain($vbulletin);
        } else {
            $db = new vB_Database_MySQLi($vbulletin);
        }
        break;
    case 'mysqli_slave':
        require_once DIR . '/includes/class_database_slave.php';
        $db = new vB_Database_Slave_MySQLi($vbulletin);
        break;
        // Load extended, non MySQL class (Not Implemented)
    // Load extended, non MySQL class (Not Implemented)
    default:
        //		$dbclass = "vB_Database_$dbtype";
        //		$db = new $dbclass($vbulletin);
        die('Fatal error: Database class not found');
}
// get core functions
if (!empty($db->explain)) {
    $db->timer_start('Including Functions.php');
    require_once DIR . '/includes/functions.php';
    $db->timer_stop(false);
} else {
    require_once DIR . '/includes/functions.php';