/** * connect() */ public function connect($dsninfo, $flags = 0) { if (!($driver = Creole::getDriver($dsninfo['phptype']))) { throw new SQLException("No driver has been registered to handle connection type: {$type}"); } $connectionClass = Creole::import($driver); $this->childConnection = new $connectionClass(); $this->log("connect(): DSN: " . var_export($dsninfo, true) . ", FLAGS: " . var_export($flags, true)); return $this->childConnection->connect($dsninfo, $flags); }
/** * @see Connection::connect() */ function connect($dsninfo, $flags = 0) { $class = Creole::getDriver($dsninfo['phptype']); $class = Creole::import($class); $this->driver = new $class(); }
/** * connect() */ public function connect($dsninfo, $flags = 0) { if (!($driver = Creole::getDriver($dsninfo['phptype']))) { throw new SQLException("No driver has been registered to handle connection type: {$type}"); } global $_DBArray; if (!isset($_DBArray) && isset($_SESSION['_DBArray'])) { //throw new SQLException("No Database Array defined for this connection but exists in session"); //Added by JHL to avoid errors trying to execute query of a dbarray on June 25, 2011 $_DBArray = $_SESSION['_DBArray']; } if (!isset($_DBArray)) { throw new SQLException("No Database Array defined for this connection"); } $this->_DBArray = $_DBArray; return true; }