public function first()
    {
        foreach ($this as $result) {
            if ($this->_statement && !$this->_useBuffering) {
                $this->_statement->closeCursor();
            }

            return $result;
        }
    }
public function first()
    {
        foreach ($this as $result) {
            if ($this->_statement && !$this->_useBuffering) {
                $this->_statement->closeCursor();
            }

            return $result;
        }
    }
public function first ( ) { foreach ( $ this as $ result ) { if ( $ this -> _statement && ! $ this -> _useBuffering ) { $ this -> _statement -> closeCursor ( ) ; } return $ result ; } }
Get the first record from a result set.

This method will also close the underlying statement cursor.

@return array|object
Get the first record from a result set .