core/Mysql.php
public function getOne(string $sql, $args = null, $field = null)
    {
        $row = $this->getRow($sql, $args);
        if ($row == null) {
            return null;
        }
        if (is_string($field) && !empty($field)) {
            return isset($row[$field]) ? $row[$field] : null;
        }
        return current($row);
    }
public function getOne(string $sql, $args = null, $field = null)
    {
        $row = $this->getRow($sql, $args);
        if ($row == null) {
            return null;
        }
        if (is_string($field) && !empty($field)) {
            return isset($row[$field]) ? $row[$field] : null;
        }
        return current($row);
    }
获得单个字段内容
@param string $sql
@param null $args
@param null $field
@return mixed|null
@throws MysqlException