summaryrefslogtreecommitdiff
path: root/framework/Data/Common/Mysql
diff options
context:
space:
mode:
authorwei <>2007-04-22 01:46:15 +0000
committerwei <>2007-04-22 01:46:15 +0000
commit6cb49ccc175edda4af9c81edc8a1866a2bf4acba (patch)
tree17e0474e9936bc21b1f5b2cfe144937751564837 /framework/Data/Common/Mysql
parent2939abbf14e5eab91ef3d3d10a0fd53c97043f2c (diff)
Fixed mysql 4: Show create table problem.
Diffstat (limited to 'framework/Data/Common/Mysql')
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php7
1 files changed, 7 insertions, 0 deletions
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