• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/favorites.php
  • Класс: CAllFavorites
  • Вызов: CAllFavorites::Update
static function Update($ID, $arFields)
{
	global $DB;
	$ID = intval($ID);

	if(!CFavorites::CheckFields($arFields))
		return false;

	$strUpdate = $DB->PrepareUpdate("b_favorite", $arFields);
	if($strUpdate!="")
	{
		$strSql = "UPDATE b_favorite SET ".$strUpdate." WHERE ID=".$ID;
		if(!$DB->Query($strSql))
			return false;
	}
	return true;
}