core/DB.php
public static function fieldFilter(array $data, string $tbname)
    {
        $fields = self::engine()->getFields($tbname);
        $temp = [];
        foreach ($fields as $field) {
            $key = $field['Field'];
            if (isset($data[$key])) {
                $temp[$key] = $data[$key];
            }
        }
        return $temp;
    }
public static function fieldFilter(array $data, string $tbname)
    {
        $fields = self::engine()->getFields($tbname);
        $temp = [];
        foreach ($fields as $field) {
            $key = $field['Field'];
            if (isset($data[$key])) {
                $temp[$key] = $data[$key];
            }
        }
        return $temp;
    }
对数据表进行过滤字段
@param array $data
@param string $tbname
@return array
@throws MysqlException