/** * @param int $accountId * @param int $newAccountId * @return bool */ function IsAccountInRing($accountId, $newAccountId) { if ($accountId == $newAccountId) { return true; } $result = false; if ($this->_dbConnection->Execute($this->_commandCreator->SelectIsAccountInRing($accountId, $newAccountId))) { while ($row = $this->_dbConnection->GetNextRecord()) { $result = $row->acct_count > 0; } } return $result; }