summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Vendor/TMysqlMetaDataInspector.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/ActiveRecord/Vendor/TMysqlMetaDataInspector.php')
-rw-r--r--framework/Data/ActiveRecord/Vendor/TMysqlMetaDataInspector.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Data/ActiveRecord/Vendor/TMysqlMetaDataInspector.php b/framework/Data/ActiveRecord/Vendor/TMysqlMetaDataInspector.php
index 5e438e37..23c483d1 100644
--- a/framework/Data/ActiveRecord/Vendor/TMysqlMetaDataInspector.php
+++ b/framework/Data/ActiveRecord/Vendor/TMysqlMetaDataInspector.php
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* TMysqlMetaDataInspector class file.
*
@@ -39,7 +39,7 @@ class TMysqlMetaDataInspector extends TDbMetaDataInspector
$command = $conn->createCommand($sql);
$command->prepare();
foreach($command->query() as $col)
- $cols[$col['Field']] = $this->getColumnMetaData($col);
+ $cols[strtolower($col['Field'])] = $this->getColumnMetaData($col);
return $cols;
}
@@ -51,7 +51,8 @@ class TMysqlMetaDataInspector extends TDbMetaDataInspector
$autoIncrement=is_int(strpos(strtolower($col['Extra']), 'auto_increment'));
$default = $col['Default'];
$primaryKey = $col['Key']==='PRI';
- return new TMysqlColumnMetaData($col['Field'],$name,$type,$notNull,$autoIncrement,$default,$primaryKey);
+ return new TMysqlColumnMetaData(strtolower($col['Field']),$name,$type,
+ $notNull,$autoIncrement,$default,$primaryKey);
}
/**