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 --- framework/Data/Common/Mysql/TMysqlMetaData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework/Data') 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