Queries for a single result-set

@param string $column Optionally can be filtered by a column
@param integer $mode Fetch mode. Can be overridden when needed
@return mixed
2837
public function query($column = null, $mode = null)
    {
        if (is_null($mode)) {
            $mode = $this->pdo->getAttribute(PDO::ATTR_DEFAULT_FETCH_MODE);
        }

        $result = array();
        $rows = $this->getStmt()->fetch($mode);

        if ($column !== null) {
            if (isset($rows[$column])) {
                $result = $rows[$column];
            } else {
                $result = false;
            }
        } else {
            $result = $rows;
        }

        if ($this->relationProcessor->hasQueue()) {
            $data = $this->relationProcessor->process(array($result));
            return isset($data[0]) ? $data[0] : false;
        }

        // By default
        return $result;
    }
1191906
public function get($columns = ['*'])
    {
        $columns = $this->query->getQuery()->columns ? [] : $columns;

        if ($columns === ['*']) {
            $columns = [$this->related->getTable().'.*'];
        }

        $columns[] = $this->getQualifiedFirstLocalKeyName().' as '.static::THROUGH_KEY;

        $this->query->addSelect($columns);

        return $this->query->get();
    }
940546
public function getValue(string $column)
    {
        if ($column === 'id') return $this->id;
        return $this->data[$column]->getValue();
    }
1337835
public function get($columns = ['*'])
    {
        return collect($this->onceWithColumns(Arr::wrap($columns), function () {
            return $this->processor->processSelect($this, $this->runSelect());
        }));
    }
264582
public function sqlFetchAllColumn(string $sql, array $params = [], string $column = '0'): array
    {
        return $this->connection()->sqlFetchAllColumn($sql, $params, $column);
    }
252350
public static function getInfo($column=null)
	{
		if($column != null) {
			$model = self::model()->findByPk(1, array(
				'select' => $column,
			));
			if(count(explode(',', $column)) == 1)
				return $model->$column;
			else
				return $model;
			
		} else {
			$model = self::model()->findByPk(1);
			return $model;
		}
	}
511456
protected function _get($columns = '*')
    {
        $data = $this->db->select($this->table, $columns, $this->where);

        if (empty($data)) {
            return false;
        }

        return $this->getModelObjects($data);
    }
1320960
public function columns($column = null)
	{
		if($column !== null)
		{
			$this->select([$column]);
		}

		$query = $this->compiler->select();

		return $this->connection->columns($query['sql'], $query['params']);
	}
487008
public function where($column, $value = null)
    {
        if (is_array($value)) {
            return $this->whereIn($column, $value);
        }

        if ($column instanceof Closure) {
            return $this->using($column);
        }

        $this->wheres[] = compact('column', 'value');

        return $this;
    }
1032197
public function fetchColumn($col = 0)
    {
        if (!$this->_stmt) {
            return false;
        }

        if (!sqlsrv_fetch($this->_stmt)) {
            if (null !== $error = sqlsrv_errors()) {
                // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
                throw new Zend_Db_Statement_Sqlsrv_Exception($error);
            }

            // If no error, there is simply no record
            return false;
        }

        $data = sqlsrv_get_field($this->_stmt, $col); //0-based
        if ($data === false) {
            // require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
            throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
        }

        return $data;
    }
194813
public static function all($column='')
    {
        $instance = new static;

        $result = $instance->newRequest($instance->functionCall,$instance->module);

        $collection = $instance->newCollection();
        foreach($result as $key => $object){
            $collection->put($key, new static((array) $object));
        }
        return $collection;
    }
812156
public function whereIs(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereIs($column);

        return $instance;
    }
1207269
public function findWhere (string $column=NULL, ...$values)
    {
    	if (empty($this->filteredResult)) return $this;
		$newReadResult 			= filterObject($this->filteredResult, $column, ...$values);
		$this->filteredResult 	= $newReadResult;
		$this->result 			= $newReadResult;
		return $this;
    }
44267
public function queryValue(string $sql, string $column, $default = null)
    {
        $result = $default;
        if ($row = $this->query($sql)->fetch(PDO::FETCH_ASSOC)) {
            $result = $row[$column];
        }

        return $result;
    }
1026187
public function count($column = NULL)
	{
		if ($column) {
			return $this->sum($column);
		}

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

		list(, $criteria, $options) = $this->queryBuilder->buildSelectQuery();

		return $this->query->count($this->name, $criteria, $options);
	}
1172388
public function orWhereIsNotNull(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->orWhereIsNotNull($column);

        return $instance;
    }
1033761
public function getDefault($column)
    {
        $defaults = $this->getDefaults();
        return isset($defaults[$column]) ? $defaults[$column] : null;
    }