• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/binding/entitycontacttable.php
  • Класс: Bitrix\Crm\Binding\EntityContactTable
  • Вызов: EntityContactTable::deleteByItem
static function deleteByItem(int $entityTypeId, int $entityId): void
{
	$connection = Application::getConnection();
	$helper = $connection->getSqlHelper();

	/** @noinspection SqlResolve */
	$connection->query(sprintf(
		'DELETE FROM %s WHERE ENTITY_TYPE_ID = %d AND ENTITY_ID = %d',
		$helper->quote(static::getTableName()),
		$helper->convertToDbInteger($entityTypeId),
		$helper->convertToDbInteger($entityId)
	));
}