/** * 設定 HAVING 條件式 * * @param mixed $cond * @return Db_Select */ public function orHaving($cond) { if (func_num_args() > 1) { $val = func_get_arg(1); $cond = $this->_db->quoteInto($cond, $val); } if ($this->_parts['HAVING']) { $this->_parts['HAVING'][] = "OR ({$cond})"; } else { $this->_parts['HAVING'][] = "({$cond})"; } return $this; }