From 5d8f02c263283f1bf825f980ecf4ce8cab4013a3 Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Wed, 13 May 2009 06:01:17 +0000 Subject: Fixed Issue#95 TMysqlMetaData::getShowCreateTable() throws TPhpErrorException "[Notice] Undefined index: Create Table" if table is a view --- HISTORY | 1 + framework/Data/Common/Mysql/TMysqlMetaData.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 7dac8fd2..30c85fe3 100644 --- a/HISTORY +++ b/HISTORY @@ -16,6 +16,7 @@ BUG: Issue#130 - TDbLogRoute::processLogs wrong values binding (Christophe) BUG: Issue#136 - TActiveDatePicker don't callback when ShowCalendar is false (Christophe) BUG: Issue#148 - Bad Oracle Support (E.Letard) BUG: Issue#150 - Multiple TDropContainers in same namingcontainer give error (Christophe) +BUG: Issue#95 - TMysqlMetaData::getShowCreateTable() throws TPhpErrorException "[Notice] Undefined index: Create Table" if table is a view BUG: URL wildcard patterns didn't work with subfolders BUG: TDbLogRoute::createDbTable: add AUTO_INCREMENT attribute to log_id column if driver is mysql (Yves) BUG: Ensure rendering of clientID in TActivePanel (Christophe) diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php index 75f7a7cf..ae552cf3 100644 --- a/framework/Data/Common/Mysql/TMysqlMetaData.php +++ b/framework/Data/Common/Mysql/TMysqlMetaData.php @@ -310,7 +310,7 @@ EOD; $sql = "SHOW CREATE TABLE `{$tableName}`"; $command = $this->getDbConnection()->createCommand($sql); $result = $command->queryRow(); - return $result['Create Table']; + return isset($result['Create Table']) ? $result['Create Table'] : (isset($result['Create View']) ? $result['Create View'] : ''); } /** -- cgit v1.2.3