Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
messageclosure.php
1<?php
2
4
6
24{
25
26 public static function getFilePath()
27 {
28 return __FILE__;
29 }
30
31 public static function getTableName()
32 {
33 return 'b_mail_message_closure';
34 }
35
36 public static function getMap()
37 {
38 return array(
39 'MESSAGE_ID' => array(
40 'data_type' => 'integer',
41 'primary' => true,
42 ),
43 'PARENT_ID' => array(
44 'data_type' => 'integer',
45 'primary' => true,
46 ),
47 );
48 }
49
57 public static function insertIgnoreFromSelect(string $fromSelect): int
58 {
59 return self::insertIgnoreFromSql("($fromSelect)");
60 }
61
69 public static function insertIgnoreFromSql(string $sql): int
70 {
71 $connection = \Bitrix\Main\Application::getConnection();
72 $sql = $connection->getSqlHelper()
73 ->getInsertIgnore(self::getTableName(), ' (MESSAGE_ID, PARENT_ID) ', $sql);
74 $connection->query($sql);
75
76 return $connection->getAffectedRowsCount();
77 }
78
79}
static insertIgnoreFromSelect(string $fromSelect)