function um_component_db_connect() { $settings = um_db_load_settings(); $return = mysql_connect($settings->dbhost, $settings->dbuser, $settings->dbpass); mysql_select_db($settings->dbname, $return); return $return; }
function um_client_db_connect(&$settings = NULL) { if (!$settings) { $settings = um_db_load_settings(); } //mysql_select_db (DB_NAME); mysql_connect($settings->dbhost, $settings->dbuser, $settings->dbpass); }