mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
修正数据库驱动
This commit is contained in:
@@ -54,8 +54,8 @@ class Mysql extends Driver
|
|||||||
$result = $this->query($sql);
|
$result = $this->query($sql);
|
||||||
$info = [];
|
$info = [];
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$result = array_change_key_case($result);
|
|
||||||
foreach ($result as $key => $val) {
|
foreach ($result as $key => $val) {
|
||||||
|
$val = array_change_key_case($val);
|
||||||
$info[$val['field']] = [
|
$info[$val['field']] = [
|
||||||
'name' => $val['field'],
|
'name' => $val['field'],
|
||||||
'type' => $val['type'],
|
'type' => $val['type'],
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ class Sqlite extends Driver
|
|||||||
$result = $this->query('PRAGMA table_info( ' . $tableName . ' )');
|
$result = $this->query('PRAGMA table_info( ' . $tableName . ' )');
|
||||||
$info = [];
|
$info = [];
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$result = array_change_key_case($result);
|
|
||||||
foreach ($result as $key => $val) {
|
foreach ($result as $key => $val) {
|
||||||
|
$val = array_change_key_case($val);
|
||||||
$info[$val['name']] = [
|
$info[$val['name']] = [
|
||||||
'name' => $val['name'],
|
'name' => $val['name'],
|
||||||
'type' => $val['type'],
|
'type' => $val['type'],
|
||||||
|
|||||||
Reference in New Issue
Block a user