• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/update/eventwithlocationupdate.php
  • Класс: BitrixCalendarUpdateEventWithLocationUpdate
  • Вызов: EventWithLocationUpdate::getTotalCountLocation
private function getTotalCountLocation(): int
{
	global $DB;
	$count = 0;
	$result = $DB->Query("
		SELECT COUNT(*) AS cnt
		FROM b_calendar_event
		WHERE ID = PARENT_ID 
		AND CAL_TYPE = 'location' 
	    AND DELETED = 'N';"
	);
	if ($res = $result->Fetch())
	{
		$count = (int)$res['cnt'];
	}

	return $count;
}