CDBResult
CFile::GetByID(
int file_id
)
The method GetByID returns information on a registered file as an instance of the CDBResult class.
Parameters
Parameter | Description |
file_id |
Numeric ID of the file. |
See Also
Example
<?
if ($rsElements = GetIBlockElementListEx($IBLOCK_TYPE,
$IBLOCK_ID, false,
array($ELEMENT_SORT_FIELD => $ELEMENT_SORT_ORDER,
"ID" => "ASC"),
false, $arrFilter)):
$rsElements->NavStart($PAGE_ELEMENT_COUNT);
while ($obElement = $rsElements->GetNextElement()):
$arElement = $obElement->GetFields();
$rsFile = CFile::GetByID($arElement["PREVIEW_PICTURE"]);
$arFile = $rsFile->Fetch();
$arrImages[$arElement["ID"]][] = $arFile;
endwhile;
endif;
?>