pdo - cleanup
This commit is contained in:
parent
8a34f7ca7b
commit
29340152b6
@ -53,8 +53,6 @@ class DBA {
|
|||||||
self::$tquot = '"';
|
self::$tquot = '"';
|
||||||
self::$scheme = 'pgsql';
|
self::$scheme = 'pgsql';
|
||||||
|
|
||||||
// require_once('include/dba/dba_postgres.php');
|
|
||||||
// self::$dba = new dba_postgres($server, self::$scheme, $port, $user, $pass, $db, $install);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!($port))
|
if(!($port))
|
||||||
@ -63,14 +61,12 @@ class DBA {
|
|||||||
$server = '127.0.0.1';
|
$server = '127.0.0.1';
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once('include/dba/dba_pdo.php');
|
require_once('include/dba/dba_pdo.php');
|
||||||
self::$dba = new dba_pdo($server,self::$scheme,$port,$user,$pass,$db,$install);
|
self::$dba = new dba_pdo($server,self::$scheme,$port,$user,$pass,$db,$install);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(is_object(self::$dba) && self::$dba->connected) {
|
if(is_object(self::$dba) && self::$dba->connected) {
|
||||||
|
|
||||||
$dns = ((self::$dbtype == DBTYPE_POSTGRES) ? 'postgres' : 'mysql')
|
$dns = ((self::$dbtype == DBTYPE_POSTGRES) ? 'pgsql' : 'mysql')
|
||||||
. ':host=' . $server . (is_null($port) ? '' : ';port=' . $port)
|
. ':host=' . $server . (is_null($port) ? '' : ';port=' . $port)
|
||||||
. ';dbname=' . $db;
|
. ';dbname=' . $db;
|
||||||
self::$dba->pdo_set(array($dns,$user,$pass));
|
self::$dba->pdo_set(array($dns,$user,$pass));
|
||||||
|
Reference in New Issue
Block a user