public function group($spec)
    {
        if (!is_array($spec)) {
            $spec = array($spec);
        }

        foreach ($spec as $val) {
            if (preg_match('/\(.*\)/', (string) $val)) {
                $val = new Zend_Db_Expr($val);
            }
            $this->_parts[self::GROUP][] = $val;
        }

        return $this;
    }
public function group($spec)
    {
        if (!is_array($spec)) {
            $spec = array($spec);
        }

        foreach ($spec as $val) {
            if (preg_match('/\(.*\)/', (string) $val)) {
                $val = new Zend_Db_Expr($val);
            }
            $this->_parts[self::GROUP][] = $val;
        }

        return $this;
    }
public function group ( $ spec ) { if ( ! is_array ( $ spec ) ) { $ spec = array ( $ spec ) ; } foreach ( $ spec as $ val ) { if ( preg_match ( '/\(.*\)/' , ( string ) $ val ) ) { $ val = new Zend_Db_Expr ( $ val ) ; } $ this -> _parts [ self :: GROUP ] [ ] = $ val ; } return $ this ; }
Adds grouping to the query.

@param  array|string $spec The column(s) to group by.
@return Zend_Db_Select This Zend_Db_Select object.
Adds grouping to the query .