1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
iblockoffers.php
См. документацию.
1<?php
2
4
6{
7 public static function Add($intProductIBlockID,$intOffersIBlockID)
8 {
9 global $DB;
10
11 $intProductIBlockID = (int)$intProductIBlockID;
12 $intOffersIBlockID = (int)$intOffersIBlockID;
13 if ($intProductIBlockID <= 0 || $intOffersIBlockID <= 0)
14 {
15 return false;
16 }
17
19 $helper = $connection->getSqlHelper();
20
21 $arFields = [
22 'PRODUCT_IBLOCK_ID' => $intProductIBlockID,
23 'OFFERS_IBLOCK_ID' => $intOffersIBlockID,
24 '~TIMESTAMP_X' => $helper->getCurrentDateTimeFunction(),
25 ];
26 unset($helper, $connection);
27
28 return $DB->Add('b_iblock_offers_tmp', $arFields);
29 }
30
31 public static function Delete($ID)
32 {
33 global $DB;
34
35 $ID = (int)$ID;
36 if ($ID <= 0)
37 return false;
38 if(!$DB->Query("DELETE FROM b_iblock_offers_tmp WHERE ID=".$ID))
39 return false;
40 return true;
41 }
42
43 public static function GetOldID($intProductIBlockID,$intOffersIBlockID)
44 {
45 return false;
46 }
47
48 public static function DeleteOldID($intProductIBlockID,$intOffersIBlockID,$intInterval = 86400)
49 {
50 return true;
51 }
52}
$connection
Определения actionsdefinitions.php:38
static getConnection($name="")
Определения application.php:638
static Add($intProductIBlockID, $intOffersIBlockID)
Определения iblockoffers.php:7
static Delete($ID)
Определения iblockoffers.php:31
static DeleteOldID($intProductIBlockID, $intOffersIBlockID, $intInterval=86400)
Определения iblockoffers.php:48
static GetOldID($intProductIBlockID, $intOffersIBlockID)
Определения iblockoffers.php:43
$arFields
Определения dblapprove.php:5
if($ajaxMode) $ID
Определения get_user.php:27
global $DB
Определения cron_frame.php:29