• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/counter/counterprocessor.php
  • Класс: BitrixTasksInternalsCounterCounterProcessor
  • Вызов: CounterProcessor::batchInsert
private function batchInsert(array $data): void
{
	$req = [];
	foreach ($data as $row)
	{
		$row['TYPE'] = "'". $row['TYPE'] ."'";
		$req[] = implode(',', $row);
	}

	if (empty($req))
	{
		return;
	}

	$sql = "
		INSERT INTO ". CounterTable::getTableName(). "
		(`USER_ID`, `TASK_ID`, `GROUP_ID`, `TYPE`, `VALUE`)
		VALUES
		(". implode("),(", $req) .")
	";

	Application::getConnection()->query($sql);
}