Y
Y
Yuriy2019-07-03 14:37:07
1C-Bitrix
Yuriy, 2019-07-03 14:37:07

Bitrix SelectedRowsCount?

$entity_data_class = GetEntityDataClass($SALE_DISCOUNT_INFORMER_HL_BLOCK_ID);

                $arFilter = Array(
                   Array(
                      "LOGIC"=>"AND",
                      Array(
                         "UF_USER_ID"=>$arUser["ID"]
                      ),
                      Array(
                         "UF_GROUP_ID"=>$arGroupId
                      )
                   )
                );
                $rsData = $entity_data_class::getList(array(
                   'select' => array('*'),
                   'filter' => $arFilter
                ));

if(!intval($rsData->SelectedRowsCount())){
 ...
}

I get an error
[Error] 
Call to undefined method Bitrix\Main\ORM\Query\Result::SelectedRowsCount() (0)

in $rsData
object(Bitrix\Main\ORM\Query\Result)#68 (15) { ["result":protected]=> object(Bitrix\Main\DB\MysqliResult)#232 (9) { ["resource":protected]=> object(mysqli_result)#219 (5) { ["current_field"]=> int(0) ["field_count"]=> int(10) ["lengths"]=> NULL ["num_rows"]=> int(1) ["type"]=> .....

["num_rows"]=> int(1)

what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuriy, 2019-07-03
@yous

I will answer myself))
$rsData->getSelectedRowsCount()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question