mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
修正数据库驱动类
This commit is contained in:
@@ -29,13 +29,13 @@ class Mysql extends Driver{
|
||||
$info = [];
|
||||
if($result) {
|
||||
foreach ($result as $key => $val) {
|
||||
$info[$val['Field']] = array(
|
||||
'name' => $val['Field'],
|
||||
'type' => $val['Type'],
|
||||
'notnull' => (bool) ($val['Null'] === ''), // not null is empty, null is yes
|
||||
'default' => $val['Default'],
|
||||
'primary' => (strtolower($val['Key']) == 'pri'),
|
||||
'autoinc' => (strtolower($val['Extra']) == 'auto_increment'),
|
||||
$info[$val['field']] = array(
|
||||
'name' => $val['field'],
|
||||
'type' => $val['type'],
|
||||
'notnull' => (bool) ($val['null'] === ''), // not null is empty, null is yes
|
||||
'default' => $val['default'],
|
||||
'primary' => (strtolower($val['key']) == 'pri'),
|
||||
'autoinc' => (strtolower($val['extra']) == 'auto_increment'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user