Answer the question
In order to leave comments, you need to log in
How to get the number of Highloadblock Bitrix rows?
Good afternoon, on the page I display the related elements of the directory using the code below, but I can’t figure out how to get the selected number of rows from the table?
<?php
CModule::IncludeModule("highloadblock");
use Bitrix\Highloadblock as HL;
use Bitrix\Main\Entity;
$HL_ids = array(1,2,3,4);
$HL_id = 2;
$HL_block = HL\HighloadBlockTable::getById($HL_id)->fetch();
$HL_entity = HL\HighloadBlockTable::compileEntity($HL_block);
$HL_e_class = $HL_entity->getDataClass();
$HL_data = $HL_e_class::getList(array(
"select" => array("ID", "UF_NAME", "UF_FULL_DESCRIPTION"),
"order" => array("UF_SORT" => "ASC"),
"filter" => array("ID" => $HL_ids)
));
// $HL_count = ???
while($arData = $HL_data->Fetch())
{
echo $arData['ID'].'<br>';
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question