From 16f79b70e4e3fd572de4d3fc938802fa8c536bca Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 17 May 2016 22:32:49 -0700 Subject: experimental PDO DBA driver --- include/dba/dba_driver.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'include/dba/dba_driver.php') diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index 4a1752672..498bfffa7 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -32,16 +32,23 @@ function dba_factory($server, $port,$user,$pass,$db,$dbtype,$install = false) { if(is_null($port)) $set_port = 5432; $dba = new dba_postgres($server, $set_port, $user, $pass, $db, $install); } else { +// require_once('include/dba/dba_pdo.php'); +// $dba = new dba_pdo($server, $set_port,$user,$pass,$db,$install); +// } + if(class_exists('mysqli')) { if (is_null($port)) $set_port = ini_get("mysqli.default_port"); require_once('include/dba/dba_mysqli.php'); $dba = new dba_mysqli($server, $set_port,$user,$pass,$db,$install); - } else { - if (is_null($port)) $set_port = "3306"; - require_once('include/dba/dba_mysql.php'); - $dba = new dba_mysql($server, $set_port,$user,$pass,$db,$install); } } + +// else { +// if (is_null($port)) $set_port = "3306"; +// require_once('include/dba/dba_mysql.php'); +// $dba = new dba_mysql($server, $set_port,$user,$pass,$db,$install); +// } +// } if(is_object($dba) && $dba->connected) { $dns = (($dbtype == DBTYPE_POSTGRES) ? 'postgres' : 'mysql') -- cgit v1.2.3