Documentation

CLQuestion::GetByID

CDBResult
CLQuestion::GetByID(
 int ID
);

The GetByID method returns a question identified by the ID.

Parameters

ParameterDescription
ID The question ID.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • Question fields
  • CLQuestion::GetList
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $QUESTION_ID = 289;
        
        $res = CLQuestion::GetByID($QUESTION_ID);
    
        if ($arQuestion = $res->GetNext())
        {
            echo "Name: ".$arQuestion["NAME"];
        }
    }
    ?>
    © «Bitrix24», 2001-2024