1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
InsertSelectTrait.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Common;
4
5use Bitrix\Main\Application;
6use Bitrix\Main\ORM\Query\Query;
7
8trait InsertSelectTrait
9{
10 public static function insertSelect(Query $query, array $fields, bool $isIgnore = true): void
11 {
12 $connection = Application::getConnection();
13 $helper = $connection->getSqlHelper();
14 $tableName = $helper->quote(static::getTableName());
15 $fields = implode(', ', array_map([$helper, 'quote'], $fields));
16
17 if ($isIgnore)
18 {
19 $sql = $helper->getInsertIgnore(
20 $tableName,
21 " ({$fields}) ",
22 $query->getQuery()
23 );
24 }
25 else
26 {
27 $sql = "INSERT INTO {$tableName} ({$fields}) \n {$query->getQuery()} ";
28 }
29
30 $connection->queryExecute($sql);
31 }
32}
$fields
Определения entity.php:45
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения chain.php:3