1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
updatebyfiltertrait.php
См. документацию.
1<?php
2
4
6
7trait UpdateByFilterTrait
8{
16 public static function updateByFilter(array $filter, array $fields): void
17 {
18 $entity = static::getEntity();
19 $sqlTableName = static::getTableName();
20 $sqlHelper = $entity->getConnection()->getSqlHelper();
21
22 $update = $sqlHelper->prepareUpdate($sqlTableName, $fields);
23 $where = Query::buildFilterSql($entity, $filter);
24 if ($where !== '' && $update[0] !== '')
25 {
26 $sql = "UPDATE {$sqlTableName} SET {$update[0]} WHERE {$where}";
27 $entity->getConnection()->queryExecute($sql);
28 }
29 }
30}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entity
$filter
Определения iblock_catalog_list.php:54
Определения chain.php:3
$fields
Определения yandex_run.php:501