From 6cb49ccc175edda4af9c81edc8a1866a2bf4acba Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 22 Apr 2007 01:46:15 +0000 Subject: Fixed mysql 4: Show create table problem. --- framework/Data/Common/Mysql/TMysqlMetaData.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'framework/Data/Common') diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php index ebe851b6..15a75ae5 100644 --- a/framework/Data/Common/Mysql/TMysqlMetaData.php +++ b/framework/Data/Common/Mysql/TMysqlMetaData.php @@ -5,6 +5,11 @@ Prado::using('System.Data.Common.TDbMetaData'); Prado::using('System.Data.Common.Mysql.TMysqlTableInfo'); +/** + * Requires PHP 5.1.3 due to problem with mysql and PDO. + * See http://netevil.org/node.php?nid=795&SC=1 + * + */ class TMysqlMetaData extends TDbMetaData { private $_serverVersion=0; @@ -266,6 +271,8 @@ EOD; */ protected function getShowCreateTable($schemaName, $tableName) { + //See http://netevil.org/node.php?nid=795&SC=1 + $this->getDbConnection()->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); if($schemaName!==null) $sql = "SHOW CREATE TABLE `{$schemaName}`.`{$tableName}`"; else -- cgit v1.2.3