• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/internals/discount.php
  • Класс: BitrixSaleInternalsDiscountTable
  • Вызов: DiscountTable::updateSpecificFields
static function updateSpecificFields($id, array $fields)
{
	if (!$fields)
	{
		return;
	}

	$connection = MainApplication::getConnection();
	$sqlHelper = $connection->getSqlHelper();

	$tableName = static::getTableName();
	$update = $sqlHelper->prepareUpdate($tableName, $fields);

	$connection->queryExecute(
		"UPDATE {$tableName} SET {$update[0]} WHERE ID={$id}"
	);
}