*/
public function connect()
{
+ if ($this->_active) {
+ return;
+ }
+
$config = $this->_parseConfig();
if (!empty($config['ssl'])) {
*/
public function connect()
{
+ if ($this->_active) {
+ return;
+ }
+
list($dsn, $user, $pass) = $this->_parseConfig();
$oldErrorReporting = error_reporting(0);
*/
public function isActive()
{
- return isset($this->_connection) && $this->_connection->query('SELECT 1');
+ return isset($this->_connection) &&
+ $this->_connection->query('SELECT 1');
}
*/
public function connect()
{
+ if ($this->_active) {
+ return;
+ }
+
parent::connect();
// ? $this->_connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
##########################################################################*/
/**
- * Connect to the db
+ * Connect to the db.
+ *
+ * @throws Horde_Db_Exception
*/
public function connect()
{
+ if ($this->_active) {
+ return;
+ }
+
parent::connect();
$retval = $this->_connection->exec("SET datestyle TO 'iso'");
##########################################################################*/
/**
- * Connect to the db
+ * Connect to the db.
+ *
+ * @throws Horde_Db_Exception
*/
public function connect()
{
+ if ($this->_active) {
+ return;
+ }
+
parent::connect();
$this->_connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);