Merge branch 'master' of github.com:aviat4ion/OpenSQLManager

This commit is contained in:
Timothy Warren 2012-02-10 17:58:53 -05:00
commit 103d665e57
2 changed files with 13 additions and 1 deletions

View File

@ -24,6 +24,9 @@ class ODBC extends DB_PDO {
function __construct($dsn, $username=null, $password=null, $options=array()) function __construct($dsn, $username=null, $password=null, $options=array())
{ {
parent::__construct("odbc:$dsn", $username, $password, $options); parent::__construct("odbc:$dsn", $username, $password, $options);
$class = __CLASS__.'_manip';
$this->manip = new $class;
} }
/** /**

View File

@ -108,10 +108,19 @@ class pgSQL extends DB_PDO {
*/ */
function get_schemas($database="") function get_schemas($database="")
{ {
$sql = 'SELECT '; if($database === "")
{
$sql = 'SELECT DISTINCT "schemaname" FROM pg_tables
WHERE "schemaname" NOT LIKE \'pg\_%\'';
}
$sql = 'SELECT DISTINCT "schemaname" FROM pg_tables
WHERE "schemaname" NOT LIKE \'pg\_%\'';
$res = $this->query($sql); $res = $this->query($sql);
$schemas = $res->fetchAll(PDO::FETCH_ASSOC); $schemas = $res->fetchAll(PDO::FETCH_ASSOC);
return $schemas;
} }
/** /**