Created
January 22, 2016 07:55
-
-
Save chebanenko/666c612c34b321fdcc13 to your computer and use it in GitHub Desktop.
Get Properties D7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dbElement = ElementTable::getList([ | |
'select' => ['ID', 'XML_ID', 'NAME', 'LINK', 'PROPERTY.ID', 'IBLOCK_ID'], | |
'filter' => [ | |
'=IBLOCK_ID' => 3, | |
'=LINK' => $elementID, | |
'=PROPERTY.CODE' => 'CML2_LINK' | |
], | |
'order' => ['ID'], | |
'runtime' => [ | |
'PROPERTY' => [ | |
'data_type' => 'Bitrix\Iblock\PropertyTable', | |
'reference' => ['=this.IBLOCK_ID' => 'ref.IBLOCK_ID'], | |
'join_type' => "LEFT", | |
], | |
'LINK' => [ | |
'data_type' => 'float', | |
'expression' => [ | |
'(SELECT b_iblock_element_property.VALUE | |
FROM b_iblock_element_property | |
WHERE b_iblock_element_property.IBLOCK_PROPERTY_ID=%s | |
AND b_iblock_element_property.IBLOCK_ELEMENT_ID=%s)', | |
'PROPERTY.ID', | |
'ID', | |
], | |
], | |
], | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment