/** * @param string $sEmail * @return int */ public function GetAccountUsedSpaceInKBytesByEmail($sEmail) { $iResult = 0; if ($this->oConnection->Execute($this->oCommandCreator->GetAccountUsedSpaceInKBytesByEmail($sEmail))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow) { $sQuotaUsageBytes = (string) $oRow->main_usage; if (0 < strlen($sQuotaUsageBytes) && is_numeric($sQuotaUsageBytes)) { $iResult = (int) ($sQuotaUsageBytes / 1024); } } $this->oConnection->FreeResult(); } return $iResult; }
/** * @param string $sEmail * @return string */ public function GetAccountUsedSpaceInKBytesByEmail($sEmail) { return parent::GetAccountUsedSpaceInKBytesByEmail($sEmail) . ' LIMIT 1'; }