From f4df5424f49214312fbfb398dc4ee78f440b00ed Mon Sep 17 00:00:00 2001 From: runa Date: Tue, 31 Oct 2006 18:48:13 +0000 Subject: [PATCH] listTables and listDatabases should return a 1 dimension array --- lib/Doctrine/DataDict/Mysql.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/DataDict/Mysql.php b/lib/Doctrine/DataDict/Mysql.php index bbe77a2ca..17802e982 100644 --- a/lib/Doctrine/DataDict/Mysql.php +++ b/lib/Doctrine/DataDict/Mysql.php @@ -273,8 +273,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict { public function listDatabases() { $sql = 'SHOW DATABASES'; - return $this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC); - + return $this->dbh->query($sql)->fetchAll(PDO::FETCH_COLUMN); } /** * lists all availible database functions @@ -358,7 +357,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict { public function listTables($database = null) { $sql = 'SHOW TABLES'; - return $this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC); + return $this->dbh->query($sql)->fetchAll(PDO::FETCH_COLUMN); } /** * lists table triggers