Get the first result from the SELECT-Statement.

@api

@param string $field

@return mixed
184962
public function getFirstResult($field = null)
    {
        if (empty($this->results)) {
            $this->results = isset($field) ? $this->stmt->fetch()[$field] : $this->stmt->fetch();
        }

        return $this->results;
    }
389103
public function getOrderBy($field)
    {
        return array_key_exists($field, $this->orderBy) ?
                  $this->orderBy[$field]
                : null;
    }
470262
private function getPlainField($field)
    {
        if (!isset($this->fields[$field['name']])) {                     
			$this->fields[$field['name']] = $this->getDbConnection()->fetchColumn('SELECT `'.$field['name'].'` FROM '.$this->table.' WHERE id='.(int)$this->fields['id']);
		}
        return $this->fields[$field['name']];
    }
1278870
public function getField($field)
    {
        // If we already have a value in $this->record, then we should just return that
        if (isset($this->record[$field])) {
            return $this->record[$field];
        }

        // Do we have a field that needs to be lazy loaded?
        if (isset($this->record[$field . '_Lazy'])) {
            $tableClass = $this->record[$field . '_Lazy'];
            $this->loadLazyFields($tableClass);
        }
        $schema = static::getSchema();

        // Support unary relations as fields
        if ($schema->unaryComponent(static::class, $field)) {
            return $this->getComponent($field);
        }

        // In case of complex fields, return the DBField object
        if ($schema->compositeField(static::class, $field)) {
            $this->record[$field] = $this->dbObject($field);
        }

        return isset($this->record[$field]) ? $this->record[$field] : null;
    }
939482
function getone($field = '')
    {
        $this->limit('1');
        if ($this->auto_cache or !empty($cache_id))
        {
            $cache_key = empty($cache_id) ? self::CACHE_PREFIX . '_one_' . md5($this->sql) : self::CACHE_PREFIX . '_all_' . $cache_id;
            global $php;
            $record = $php->cache->get($cache_key);
            if (empty($data))
            {
                if ($this->is_execute == 0)
                {
                    $this->exeucte();
                }
                $record = $this->result->fetch();
                $php->cache->set($cache_key, $record, $this->cache_life);
            }
        }
        else
        {
            if ($this->is_execute == 0)
            {
                $this->exeucte();
            }
            $record = $this->result->fetch();
        }
        if ($field === '')
        {
            return $record;
        }
        return $record[$field];
    }
523315
public function offset_get_result($field)
    {
        $data_links = null;
        if (isset($this->links['*'])) {
            $data_links = $this->links['*'];
        } else if (isset($this->links[$field]['links'])) {
            $data_links = $this->links[$field]['links'];
        }

        $data_value = parent::offsetExists($field) ? parent::offsetGet($field) : null;

        if (is_array($data_value) && !empty($data_value)) {
            $collection = isset($this->headers['$collection']) ? $this->headers['$collection'] : null;
            $data_record = new Record(array(
                '$url' => $this->link_url($field),
                '$data' => $data_value,
                '$links' => $data_links,
                '$collection' => $collection
            ));
            $this->offsetSet($field, $data_record);
            return $data_record;
        }
        else if (!isset($data_value)) {
            // Find object within array by id
            $data = $this->getArrayCopy();
            foreach ($data as $data_val) {
                if (isset($data_val['id']) && $data_val['id'] === $field) {
                    $data_value = $data_val;
                    break;
                }
            }
        }

        return $data_value;
    }
879080
public function findValue($field) {
        $row = $this->select($field)->findOne();

        //false or null
        if (!$row) {
            return $row;
        }

        return $row[$field];
    }
639435
public function getField($field)
    {
        if (isset($this->allFields[$field])) {
            return $this->allFields[$field];
        }

        return null;
    }
664179
public function fieldQuery($field)
    {
        $query = $this->dsql()->del('fields');
        if (is_string($field)) {
            $field = $this->getElement($field);
        }
        $field->updateSelectQuery($query);

        return $query;
    }
562226
protected function getField($field)
    {
        if ($this->isFieldSupported($field) && isset($this->fields[ $field ])) {
            return $this->fields[ $field ];
        }

        return null;
    }
486851
public function get_field_raw( $field ) {
		if ( array_key_exists( $field, $this->prop( 'fields' ) ) ) {
			return $this->prop( 'fields' )[ $field ];
		}

		return null;
	}
726381
public function fetchColumn($field = '')
    {
        $opts = $this->options;
        
        if ($field) {
            $opts['field'] = $field;
        }
        
        $sql = QueryBuilder::optionsToSql($opts);        
        $colValue = $this->getDb()->getColumn($sql);
        
        return $colValue;
    }
1313972
public function resolveForField($field)
    {
        if (! is_null($element = $this->findById($field))) {
            return $element;
        }

        return $this->firstOrFail([
            $field, "input[name='{$field}']", "textarea[name='{$field}']",
            "select[name='{$field}']", "button[name='{$field}']",
        ]);
    }
436192
public function get($field)
    {
        $client = $this->getClient();

        return $client->hget($this->getKey()->getName(), $field);
    }
1022667
public function getField($field)
    {
        return isset($this->data[$field]) ? $this->data[$field] : null;
    }
1266637
public function find($criteria, $field = null, $limit = null)
    {
        if (is_array($criteria)) {
            return $this->findIn($criteria, $field);
        }

        $field = isset($field) ? $field : $this->primaryKey;
        if (strpos($field, '.') === false) {
            $field = $this->table . '.' . $field;
        }

        if ($result = $this->qb
            ->from($this->table)
            ->where($field, $criteria)
            ->get($limit)) {
            if ($result->count() > 0) {
                $this->result = new DataObjects\Result($result, $this);
                $this->result->setInfo($result->getInfo());

                if ($this->result->count() == 1) {
                    return $this->result->first();
                }

                return $this->result;
            }
        }

        return false;
    }
1103904
public function get($field) {
        return key_exists($field, $this->_properties) ? $this->_properties[$field] : null;
    }