$ELEMENT_ID = 18; // êîä ýëåìåíòà
$PROPERTY_CODE = "PROP1"; // êîä ñâîéñòâà
$PROPERTY_VALUE = "Ñèíèé"; // çíà÷åíèå ñâîéñòâà
// Óñòàíîâèì íîâîå çíà÷åíèå äëÿ äàííîãî ñâîéñòâà äàííîãî ýëåìåíòà
$strSql =
"SELECT BE.IBLOCK_ID ".
"FROM b_iblock_element BE ".
"WHERE BE.ID = ".IntVal($ELEMENT_ID);
$dbr = $DB->Query($strSql);
if ($dbr_arr = $dbr->Fetch())
{
$IBLOCK_ID = $dbr_arr["IBLOCK_ID"];
CIBlockElement::SetPropertyValues($ELEMENT_ID, $IBLOCK_ID, $PROPERTY_VALUE, $PROPERTY_CODE);
}
|