/** * @param string $sSql * @return CGroup */ protected function getGroupBySql($sSql) { $oGroup = false; if ($this->oConnection->Execute($sSql)) { $oGroup = null; $oRow = $this->oConnection->GetNextRecord(); if ($oRow) { $oGroup = new CGroup(); $oGroup->InitByDbRow($oRow); } $this->oConnection->FreeResult(); } $this->throwDbExceptionIfExist(); return $oGroup; }