Created
April 6, 2022 06:07
-
-
Save Ginnw2/4da3ee666438018fcd878d356a806818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Bitrix\Main\Loader; | |
Loader::includeModule("highloadblock"); | |
use Bitrix\Highloadblock as HL; | |
use Bitrix\Main\Entity; | |
$hlbl = 1; // Указываем ID нашего highloadblock блока к которому будет делать запросы. | |
$hlblock = HL\HighloadBlockTable::getById($hlbl)->fetch(); | |
$entity = HL\HighloadBlockTable::compileEntity($hlblock); | |
$entity_data_class = $entity->getDataClass(); | |
$rsData = $entity_data_class::getList(array( | |
"select" => array("*"), | |
"order" => array("ID" => "ASC"), | |
"filter" => array("UF_PRODUCT_ID"=>"77","UF_TYPE"=>'33') // Задаем параметры фильтра выборки | |
)); | |
while($arData = $rsData->Fetch()){ | |
var_dump($arData); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Bitrix\Main\Loader; | |
Loader::includeModule("highloadblock"); | |
use Bitrix\Highloadblock as HL; | |
use Bitrix\Main\Entity; | |
$hlbl = 1; // Указываем ID нашего highloadblock блока к которому будет делать запросы. | |
$hlblock = HL\HighloadBlockTable::getById($hlbl)->fetch(); | |
$entity = HL\HighloadBlockTable::compileEntity($hlblock); | |
$entity_data_class = $entity->getDataClass(); | |
// Массив полей для обновления | |
$data = array( | |
"UF_TYPE"=>'33', | |
"UF_COUNT"=>'1', | |
"UF_DATA"=>date("d.m.Y") | |
); | |
$result = $entity_data_class::update("77"], $data); // где 77 - id обновляемой записи |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Bitrix\Main\Loader; | |
Loader::includeModule("highloadblock"); | |
use Bitrix\Highloadblock as HL; | |
use Bitrix\Main\Entity; | |
$hlbl = 1; // Указываем ID нашего highloadblock блока к которому будет делать запросы. | |
$hlblock = HL\HighloadBlockTable::getById($hlbl)->fetch(); | |
$entity = HL\HighloadBlockTable::compileEntity($hlblock); | |
$entity_data_class = $entity->getDataClass(); | |
// Массив полей для добавления | |
$data = array( | |
"UF_TYPE"=>'33', | |
"UF_COUNT"=>'1', | |
"UF_DATA"=>date("d.m.Y") | |
); | |
$result = $entity_data_class::add($data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Bitrix\Main\Loader; | |
Loader::includeModule("highloadblock"); | |
use Bitrix\Highloadblock as HL; | |
use Bitrix\Main\Entity; | |
$hlbl = 1; // Указываем ID нашего highloadblock блока к которому будет делать запросы. | |
$hlblock = HL\HighloadBlockTable::getById($hlbl)->fetch(); | |
$entity = HL\HighloadBlockTable::compileEntity($hlblock); | |
$entity_data_class = $entity->getDataClass(); | |
$entity_data_class::Delete("77"); // где 77 - id удаляемой записи |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment