From 1c74ee3c07cd2b25670826d44f7a1b1959302ce3 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 22 Apr 2007 05:55:59 +0000 Subject: Typo in TAutoComplete --- framework/Data/Common/Mysql/TMysqlMetaData.php | 24 ++++++++++++++++++++++-- framework/Data/Common/Sqlite/TSqliteMetaData.php | 4 ++-- 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'framework/Data/Common') diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php index 15a75ae5..89e9e3ca 100644 --- a/framework/Data/Common/Mysql/TMysqlMetaData.php +++ b/framework/Data/Common/Mysql/TMysqlMetaData.php @@ -1,4 +1,15 @@ + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2007 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @package System.Data.Common.Mysql + */ + /** * Load the base TDbMetaData class. */ @@ -6,9 +17,15 @@ 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. + * TMysqlMetaData loads Mysql version 4.1.x and 5.x database table and column information. + * + * For Mysql version 4.1.x, PHP 5.1.3 or later is required. * See http://netevil.org/node.php?nid=795&SC=1 * + * @author Wei Zhuo + * @version $Id$ + * @package System.Data.Commom.Sqlite + * @since 3.1 */ class TMysqlMetaData extends TDbMetaData { @@ -125,7 +142,6 @@ class TMysqlMetaData extends TDbMetaData return $type==='set' || $type==='enum'; } - /** * @param string table name, may be quoted with back-ticks and may contain database name. * @return array tuple ($schema,$table), $schema may be null. @@ -268,9 +284,13 @@ EOD; * @param string database name * @param string table name * @return string SQL command to create the table. + * @throws TDbException if PHP version is less than 5.1.3 */ protected function getShowCreateTable($schemaName, $tableName) { + if(version_compare(PHP_VERSION,'5.1.3','<')) + throw new TDbException('dbmetadata_requires_php_version', 'Mysql 4.1.x', '5.1.3'); + //See http://netevil.org/node.php?nid=795&SC=1 $this->getDbConnection()->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); if($schemaName!==null) diff --git a/framework/Data/Common/Sqlite/TSqliteMetaData.php b/framework/Data/Common/Sqlite/TSqliteMetaData.php index ef33f968..f9b49488 100644 --- a/framework/Data/Common/Sqlite/TSqliteMetaData.php +++ b/framework/Data/Common/Sqlite/TSqliteMetaData.php @@ -1,4 +1,4 @@ - * @version $Id: TSqliteMetaData.php 1861 2007-04-12 08:05:03Z wei $ -- cgit v1.2.3