Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
sendersendcounter.php
1<?php
9
11
28class SenderSendCounterTable extends Entity\DataManager
29{
30 public static function getTableName()
31 {
32 return 'b_main_mail_sender_send_counter';
33 }
34
35 public static function getMap()
36 {
37 return array(
38 'DATE_STAT' => array(
39 'data_type' => 'date',
40 'primary' => true,
41 ),
42 'EMAIL' => array(
43 'data_type' => 'string',
44 'primary' => true,
45 ),
46 'CNT' => array(
47 'data_type' => 'integer'
48 ),
49 );
50 }
51
52 public static function mergeData(array $insert, array $update)
53 {
54 $entity = static::getEntity();
55 $connection = $entity->getConnection();
56 $helper = $connection->getSqlHelper();
57
58 $sql = $helper->prepareMerge($entity->getDBTableName(), $entity->getPrimaryArray(), $insert, $update);
59
60 $sql = current($sql);
61 if($sql <> '')
62 {
63 $connection->queryExecute($sql);
64 $entity->cleanCache();
65 }
66 }
67}
static mergeData(array $insert, array $update)