mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-04 14:22:48 +08:00
数组定义用法统一
This commit is contained in:
@@ -29,14 +29,14 @@ class Mysql extends Driver{
|
||||
$info = [];
|
||||
if($result) {
|
||||
foreach ($result as $key => $val) {
|
||||
$info[$val['field']] = array(
|
||||
$info[$val['field']] = [
|
||||
'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'),
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
return $info;
|
||||
|
||||
Reference in New Issue
Block a user