summaryrefslogtreecommitdiff
path: root/framework/Data/Common/Mysql
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 /framework/Data/Common/Mysql
parent0269b09a498c0d5c98ba4cd9690827f65bb2d1b4 (diff)
Fixed Issue#95 TMysqlMetaData::getShowCreateTable() throws TPhpErrorException "[Notice] Undefined index: Create Table" if table is a view
Diffstat (limited to 'framework/Data/Common/Mysql')
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php2
1 files changed, 1 insertions, 1 deletions
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'] : '');
}
/**