• Модуль: forum
  • Путь к файлу: ~/bitrix/modules/forum/lib/usertopic.php
  • Класс: BitrixForumUserTopicTable
  • Вызов: UserTopicTable::deleteBatch
static function deleteBatch(array $filter)
{
	$tableName = static::getTableName();
	$connection = MainApplication::getConnection();
	$helper = $connection->getSqlHelper();

	$where = [];
	foreach ($filter as $key => $value)
	{
		$where[] = $helper->prepareAssignment($tableName, $key, $value);
	}
	$where = implode(' AND ', $where);

	if($where)
	{
		$quotedTableName = $helper->quote($tableName);
		$connection->queryExecute("DELETE FROM {$quotedTableName} WHERE {$where}");
	}
}