Bitrix Site Manager

CRubric::Update

CRubric::Update(
    $ID, 
    $arFields
);

The method Update updates the mailing list.

Parameters

ParameterDescription
$IDThe mailing list ID.
$arFieldsAssociated array containing keys and values of the Mailing list object fields.

Return Values

Returns true on success. In case of an error, it returns false and the class variable LAST_ERROR contains the error description.

Example



$rubric = new CRubric;
$arFields = Array(
    "ACTIVE" => ($ACTIVE <> "Y"? "N":"Y"),
    "NAME" => $NAME,
    "SORT" => $SORT,
    "DESCRIPTION" => $DESCRIPTION,
    "LID" => $LID
);
if($ID>0)
{
    if(!$rubric->Update($ID, $arFields))
        echo $rubric->LAST_ERROR;
}