From: <jhe...@us...> - 2002-08-05 08:51:12
|
Update of /cvsroot/upcase-project/UpCase/lib In directory usw-pr-cvs1:/tmp/cvs-serv8215 Modified Files: uc_sql.php Log Message: Adapted to new config object Index: uc_sql.php =================================================================== RCS file: /cvsroot/upcase-project/UpCase/lib/uc_sql.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** uc_sql.php 16 Jul 2002 15:31:56 -0000 1.1.1.1 --- uc_sql.php 5 Aug 2002 08:51:09 -0000 1.2 *************** *** 1,23 **** <?php include_once("config/uc_config.inc"); include_once("lib/adodb/adodb.inc.php"); ! if ($uc_config[engine] == "MySQL") { include_once("lib/uc_sql-mysql.inc"); } ! class UcSQL { var $db; ! function UcSQL() { ! global $uc_config; ! $this->db = NewADOConnection($uc_config["engine"]); ! $this->db->PConnect($uc_config["host"], ! $uc_config["user"], ! $uc_config["password"], ! $uc_config["name"]) or die("Unable to connect to database: " . $this->db->ErrorMsg()); } --- 1,25 ---- <?php + include_once("config/uc_config.inc"); include_once("lib/adodb/adodb.inc.php"); ! if ($ucConfig->dbType == "MySQL") { include_once("lib/uc_sql-mysql.inc"); } ! class UcSql { var $db; ! function UcSql() { ! global $ucConfig; ! ! $this->db = NewADOConnection($ucConfig->dbType); ! $this->db->PConnect($ucConfig->dbHost, ! $ucConfig->dbUser, ! $ucConfig->dbPasswd, ! $ucConfig->dbName) or die("Unable to connect to database: " . $this->db->ErrorMsg()); } |