示例#1
0
 /**
  * Determines how many users are in particular domain, with optional filtering. Domain identifier is used for look up.
  * 
  * @param int $iDomainId Domain identifier.
  * @param string $sSearchDesc = '' If not empty, only users matching this pattern are counted.
  * 
  * @return int | false
  */
 public function getUsersCountForDomain($iDomainId, $sSearchDesc = '')
 {
     $mResultCount = false;
     if ($this->oConnection->Execute($this->oCommandCreator->getUsersCountForDomainQuery($iDomainId, $sSearchDesc))) {
         $oRow = $this->oConnection->GetNextRecord();
         if ($oRow) {
             $mResultCount = (int) $oRow->users_count;
         }
         $this->oConnection->FreeResult();
     }
     $this->throwDbExceptionIfExist();
     return $mResultCount;
 }