Documentation

GetByID

CDBResult
CFormResult::GetByID(
 int result_id
)

The function returns the result fields, as well as some web form fields and status fields as an CDBResult object class. Non-static method.

Structure of array in the object, returned by this method:

Array
(
    [ID] => result ID
    [TIMESTAMP_X] => time when result is modified
    [DATE_CREATE] => date when result is created
    [FORM_ID] => web form ID 
    [USER_ID] => ID of the user who created the result (author)
    [USER_AUTH] => flag of author authorization when result is created [Y|N]
    [STAT_GUEST_ID] => ID of visitor who created the result 
    [STAT_SESSION_ID] => ID of session containing the created result
    [STATUS_ID] => ID of status containing the result
    [STATUS_TITLE] => title of status containing the result
    [STATUS_DESCRIPTION] => description of status containing the result
    [STATUS_CSS] => name CSS class containing the result
    [SID] => web form symbol identifier
    [NAME] => web form title
    [IMAGE_ID] => web form image ID 
    [DESCRIPTION] => web form description
    [DESCRIPTION_TYPE] => type of web form description [text|html]
)

Method parameters

Parameter Description Available from version
result_id The result ID. Deleted from version 4.0.4
id The result ID. 4.0.4

See Also

Examples of use

<?
$rsResult = CFormResult::GetByID(189);
$arResult = $rsResult->Fetch();
echo "<pre>"; print_r($arResult); echo "</pre>";
?>


© «Bitrix24», 2001-2024
Up