<?php
set_time_limit(0); 
require('../../common.inc.php'); 
//mysql 链接为 $query 
$cfg['db_mssql']['host'] 		= 'localhost';  // 主机地址
$cfg['db_mssql']['user'] 		= 'root';	    // 用户名	
$cfg['db_mssql']['password'] 	= '';	    // 密码 
$cfg['db_mssql']['name'] 		= 'Fangke';		// 数据库名
$cfg['db_mssql']['provider'] 	= 'mssql';		// 数据库类型

/* 
 * mssql数据库连接
 */

//require_once($cfg['path']['lib'] . 'classes/db/DataSource.class.php');

try {
	$db_mssql = new DataSource($cfg['db_mssql']['host'], $cfg['db_mssql']['user'], $cfg['db_mssql']['password'], 
			$cfg['db_mssql']['name'], $cfg['db_mssql']['provider'], true );
	$query_mssql = new DbQueryForMssql($db_mssql);

	$db_mssql = new DataSource($cfg['db_mssql']['host'], $cfg['db_mssql']['user'], $cfg['db_mssql']['password'], 
			$cfg['db_mssql']['name'], $cfg['db_mssql']['provider'], true );
	$query_mssql2 = new DbQueryForMssql($db_mssql);
	
	unset($cfg['db_mssql']);
} catch (DbException $e) {
	// 数据库出错处理处
	echo '服务器忙，请<a href="javascript:document.location.reload()">刷新</a>页面，或稍后再试！谢谢！!';exit;
}

$cfg['db_mysql']['host'] 		= 'localhost';  // 主机地址
$cfg['db_mysql']['user'] 		= 'root';	    // 用户名	
$cfg['db_mysql']['password'] 	= '';	    // 密码 
$cfg['db_mysql']['name'] 		= '系统';		// 数据库名
$cfg['db_mysql']['provider'] 	= 'mysql';		// 数据库类型

try {
	$db_mysql = new DataSource($cfg['db_mysql']['host'], $cfg['db_mysql']['user'], $cfg['db_mysql']['password'], 
			$cfg['db_mysql']['name'], $cfg['db_mysql']['provider'], true );
	$query_mysql = new DbQueryForMysql($db_mysql);

	unset($cfg['db_mysql']);
} catch (DbException $e) {
	// 数据库出错处理处
	echo '服务器忙，请<a href="javascript:document.location.reload()">刷新</a>页面，或稍后再试！谢谢！!';exit;
}

?>