summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgodzilla80@gmx.net <>2009-05-13 06:01:17 +0000
committergodzilla80@gmx.net <>2009-05-13 06:01:17 +0000
commit5d8f02c263283f1bf825f980ecf4ce8cab4013a3 (patch)
tree0b38f1a8bc25065c81ee0fd513ed3edd80d0664b
parent0269b09a498c0d5c98ba4cd9690827f65bb2d1b4 (diff)
Fixed Issue#95 TMysqlMetaData::getShowCreateTable() throws TPhpErrorException "[Notice] Undefined index: Create Table" if table is a view
-rw-r--r--HISTORY1
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php2
2 files changed, 2 insertions, 1 deletions
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'] : '');
}
/**