summaryrefslogtreecommitdiff
path: root/framework/Data/Common
diff options
context:
space:
mode:
authorwei <>2007-04-22 05:55:59 +0000
committerwei <>2007-04-22 05:55:59 +0000
commit1c74ee3c07cd2b25670826d44f7a1b1959302ce3 (patch)
tree845369c32080b9a9564a91799488a29dbdf9c140 /framework/Data/Common
parent6cb49ccc175edda4af9c81edc8a1866a2bf4acba (diff)
Typo in TAutoComplete
Diffstat (limited to 'framework/Data/Common')
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php24
-rw-r--r--framework/Data/Common/Sqlite/TSqliteMetaData.php4
2 files changed, 24 insertions, 4 deletions
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,14 +1,31 @@
<?php
/**
+ * TMysqlMetaData class file.
+ *
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2007 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Id$
+ * @package System.Data.Common.Mysql
+ */
+
+/**
* Load the base TDbMetaData class.
*/
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 <weizho[at]gmail[dot]com>
+ * @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 @@
-<?php
+<?php
/**
* TSqliteMetaData class file.
*
@@ -17,7 +17,7 @@ Prado::using('System.Data.Common.TDbMetaData');
Prado::using('System.Data.Common.Sqlite.TSqliteTableInfo');
/**
- * TSqliteMetaData loads PostgreSQL database table and column information.
+ * TSqliteMetaData loads SQLite database table and column information.
*
* @author Wei Zhuo <weizho[at]gmail[dot]com>
* @version $Id: TSqliteMetaData.php 1861 2007-04-12 08:05:03Z wei $