public function group($spec) { if (!
is_array($spec)) { $spec =
[$spec];
} foreach ($spec as $val) { // Remove comments from SQL statement
$noComments =
preg_replace(self::REGEX_SQL_COMMENTS, '$1',
(string) $val);
if (preg_match(self::REGEX_COLUMN_EXPR_GROUP,
$noComments)) { $val =
new Zend_Db_Expr($val);
} $this->_parts
[self::GROUP
][] =
$val;
} return $this;
} /**
* Adds a HAVING condition to the query by AND.
*
* If a value is passed as the second param, it will be quoted
* and replaced into the condition wherever a question-mark
* appears. See {@link where()} for an example
*
* @param string $cond the HAVING condition
* @param mixed $value OPTIONAL The value to quote into the condition
* @param int $type OPTIONAL The type of the given value
*
* @return Zend_Db_Select this Zend_Db_Select object
*/