• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/monitor/history/reportcomment.php
  • Класс: BitrixTimemanMonitorHistoryReportComment
  • Вызов: ReportComment::remove
static function remove(int $userId, string $dateLog, string $desktopCode): Result
{
	$connection = Application::getConnection();
	$sqlHelper = $connection->getSqlHelper();

	$dateLog = $sqlHelper->forSql($dateLog);
	$desktopCode = $sqlHelper->forSql($desktopCode);

	$deleteReportCommentQuery = "
		DELETE FROM b_timeman_monitor_report_comment 
		WHERE DATE_LOG = '{$dateLog}' 
		  and USER_ID = {$userId} 
		  and DESKTOP_CODE = '{$desktopCode}'
	";

	return $connection->query($deleteReportCommentQuery);
}