protected function buildHaving() { $sql =& $this->_sql; if (count($this->having) == 0) { return; } $sql[] = "HAVING"; $this->buildWhere($this->having, ' '); }