|
<?php //pearDB connection if($_CONFIG['db_driver'] == "pdb") { require_once("$ROOT_PATH/inc/pear/DB.php"); $dsn = array( 'phptype' => $_CONFIG['db_type'], 'username' => $_CONFIG['db_username'], 'password' => $_CONFIG['db_password'], 'hostspec' => $_CONFIG['db_host'], 'database' => $_CONFIG['db_name']);
if($_CONFIG['db_type'] == "sqlite") { $dsn = array( 'phptype' => $_CONFIG['db_type'], 'database' => "$ROOT_PATH/".$_CONFIG['db_name'], 'mode' => '0644'); }
$options = array( 'persistent' => $_CONFIG['pconnect'], 'debug' => $_CONFIG['debug']);
$DB =& DB::Connect($dsn, $options); if (DB::isError($DB)) { die($DB->getMessage()); } $DB->setFetchMode(DB_FETCHMODE_ASSOC); } ?>
|