/** * @return int */ function SelectAccountsCount($searchText) { if (!$this->_dbConnection->Execute($this->_commandCreator->SelectAccountsCount($searchText))) { return 0; } $count = $this->_dbConnection->ResultCount(); return $count ? $count : 0; /* $row = $this->_dbConnection->GetNextRecord(); if ($row) { return (int) $row->account_count; }*/ }
function SessionRead($hash) { $data = false; $time = time() - 7200; if (!$this->_dbConnection->Execute($this->_commandCreator->SessionRead($hash, $time))) { return $data; } if ($this->_dbConnection->ResultCount() > 0) { $row = $this->_dbConnection->GetNextRecord(); if ($row) { $data = $row->sess_data; // $data = base64_decode($row->sess_data); } } else { if (!$this->_dbConnection->Execute($this->_commandCreator->SessionInsertNew($hash))) { return false; } } return $data; }
/** * @param CWebMailDomain $domain * @return bool */ function DomainExist($domain) { $this->_connector->Execute($this->_commandCreator->SelectDomainsIdByName($domain->_name)); return $this->_connector->ResultCount() > 0; }