Код |
---|
global $DB; $strSql = ' SEL ECT MAX(CAST(VALUE AS UNSIGNED)) AS max_num FR OM b_iblock_element_property AS a INNER JOIN b_iblock_property AS b ON b.ID = a.IBLOCK_PROPERTY_ID WHERE b.CODE = "NUMBER" '; $NumberPubl = $DB->Query($strSql)->getNext(); $NumberPubl = $NumberPubl['max_num'] ; |