Код |
---|
$rsElement = CIBlockElement::GetList($arSort, $arFilter, false, $arNavParams, $arSelect); $arResult["ITEMS"] = array(); while($obElement = $rsElement->GetNextElement()) { $arItem = $obElement->GetFields(); $arItem["PROPERTIES"] = $obElement->GetProperties(); ... } |
Цитата |
---|
омен пишет:
количество запросов к базе уменьшилось(21<2500). |
Код |
---|
<? $arResult["ITEMS"] = array(); $arSelect = array("NAME", "PREVIEW_TEXT", "PROPERTY_AUTHORS"); $rsElements = CIBlockElement::GetList($arSort, $mass, false, $arNavParams, $arSelect); while ($arElements = $rsElements->GetNext()) { $arResult["ITEMS"][$arElements["ID"]] = $arElements; $arResult["ITEMS"][$arElements["ID"]]["AUTHORS"][] = $arElements["PROPERTY_AUTHORS_VALUE"]; } ?> |