public function getColumnCount()
    {
        if (empty($this->_results)) {
            return 0;
        }
        $results = $this->_results;
        $firstRow = reset($results);
        return count($firstRow);
    }
public function getColumnCount()
    {
        if (empty($this->_results)) {
            return 0;
        }
        $results = $this->_results;
        $firstRow = reset($results);
        return count($firstRow);
    }
public function getColumnCount ( ) { if ( empty ( $ this -> _results ) ) { return 0 ; } $ results = $ this -> _results ; $ firstRow = reset ( $ results ) ; return count ( $ firstRow ) ; }
Returns the number of columns in the result set.
Note, even there's no row in the reader, this still gives correct column number.
@return int the number of columns in the result set.
Returns the number of columns in the result set . Note even there s no row in the reader this still gives correct column number .