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;
    }
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;
    }
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 ; }
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
Queries for a single result - set