/** * @param int $idGroup * @return Array */ function &SelectAddressContactsAndGroupsCount($lookForType, $idUser, $condition = null, $idGroup = null) { $outArray = array(0, 0); if ($this->_dbConnection->Execute($this->_commandCreator->SelectAddressContactsCount($lookForType, $idUser, $condition, $idGroup))) { while (false !== ($row = $this->_dbConnection->GetNextRecord())) { $outArray[0] = $row->contacts_count; } } if ($this->_dbConnection->Execute($this->_commandCreator->SelectAddressGroupsCount($lookForType, $idUser, $condition))) { while (false !== ($row = $this->_dbConnection->GetNextRecord())) { $outArray[1] = $row->groups_count; } } return $outArray; }