修正数据库驱动

This commit is contained in:
thinkphp
2016-02-03 20:41:01 +08:00
parent b825cdc117
commit b2bea910f9
2 changed files with 2 additions and 2 deletions

View File

@@ -54,8 +54,8 @@ class Mysql extends Driver
$result = $this->query($sql);
$info = [];
if ($result) {
$result = array_change_key_case($result);
foreach ($result as $key => $val) {
$val = array_change_key_case($val);
$info[$val['field']] = [
'name' => $val['field'],
'type' => $val['type'],

View File

@@ -42,8 +42,8 @@ class Sqlite extends Driver
$result = $this->query('PRAGMA table_info( ' . $tableName . ' )');
$info = [];
if ($result) {
$result = array_change_key_case($result);
foreach ($result as $key => $val) {
$val = array_change_key_case($val);
$info[$val['name']] = [
'name' => $val['name'],
'type' => $val['type'],