/** * @ignore */ public function connectionOpen() { if ($this->connection !== null) { return; } // if ($this->persistent) { // } \mysqli_report(\MYSQLI_REPORT_STRICT); // mysqli_sql_exception $this->connection = new \mysqli($this->host, $this->username, $this->password, $this->database); /* if ($this->connection->connect_errno > 0) { throw new \Exception('Mysql Exception: ' . $this->connection->connect_error); } */ parent::connectionOpen(); }
/** * @ignore */ public function connectionOpen() { if ($this->connection !== null) { return; } $tParms = array(); if ($this->persistent) { $tParms[\PDO::ATTR_PERSISTENT] = true; } if ($this->overrideCase === 'lower') { $tParms[\PDO::ATTR_CASE] = \PDO::CASE_LOWER; } elseif ($this->overrideCase === 'upper') { $tParms[\PDO::ATTR_CASE] = \PDO::CASE_UPPER; } else { $tParms[\PDO::ATTR_CASE] = \PDO::CASE_NATURAL; } $tParms[\PDO::ATTR_ERRMODE] = \PDO::ERRMODE_EXCEPTION; $this->connection = new \PDO($this->pdoString, $this->username, $this->password, $tParms); // $this->standard = $this->connection->getAttribute(\PDO::ATTR_DRIVER_NAME); parent::connectionOpen(); }