Добро пожаловать на сайт <БагБД>, где вы можете задавать вопросы о программировании и разработке на Битрикс и Битрикс24, и получать быстрые и квалифицированные ответы от профессионалов!

Как сделать выборку?

00 голосов
2
Надо получить элементы и поля дополнительные. как сделать?
Делаю так:

$arOrder = array( "NAME"=>"ASC") ;
$arSelect = array();
$arFilter = array("IBLOCK_ID" => "16", "SECTION_ID" => $_REQUEST["SECTION_ID"], "ACTIVE" => "Y");
$resElements = CIBlockElement::GetList( $arOrder, $arFilter, false, false, $arSelect );
while ( $oElement = $resElements->GetNextElement() )
{
$Element = $oElement->GetFields();
$arProp = $oElement->GetProperties();

echo ''.$Element["NAME"]."<br>";; //Тут отображаются названия...

echo $arProp["TYPE_TABLE"]["VALUE"]."<br>";;; //НЕ РАБОТАЕТ! Хотя должна появится 1
echo $arProp["ActiveDetail"]["VALUE"]."<br>";;; //НЕ РАБОТАЕТ! Хотя должна появится 1


//print_r($arProp); - <<< Ниже показан код, если убрать комментарий..

}



Код
 Array ( [TYPETABLE] => Array ( [ID] => 62 [TIMESTAMP_X] => 2009-06-08 10:37:17 [IBLOCK_ID] => 16 [NAME] => TYPETABLE [ACTIVE] => Y [SORT] => 500 [CODE] => TYPETABLE [DEFAULT_VALUE] => [PROPERTY_TYPE] => S [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => N [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => N [SEARCHABLE] => N [FILTRABLE] => N [IS_REQUIRED] => N [VERSION] => 1 [USER_TYPE] => [PROPERTY_VALUE_ID] => 4167 [B] [VALUE] => 1 [/B] [DESCRIPTION] => [VALUE_ENUM] => [VALUE_XML_ID] => [~VALUE] => 1 [~DESCRIPTION] => [~NAME] => TYPETABLE [~DEFAULT_VALUE] => ) [ActiveDetail] => Array ( [ID] => 63 [TIMESTAMP_X] => 2009-06-08 10:37:17 [IBLOCK_ID] => 16 [NAME] => ActiveDetail [ACTIVE] => Y [SORT] => 500 [CODE] => ActiveDetail [DEFAULT_VALUE] => [PROPERTY_TYPE] => S [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => N [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => [SEARCHABLE] => N [FILTRABLE] => N [IS_REQUIRED] => N [VERSION] => 1 [USER_TYPE] => [PROPERTY_VALUE_ID] => 4168 [B] [VALUE] => 1 [/B] [DESCRIPTION] => [VALUE_ENUM] => [VALUE_XML_ID] => [~VALUE] => 1 [~DESCRIPTION] => [~NAME] => ActiveDetail [~DEFAULT_VALUE] => ) [DataCol1] => Array ( [ID] => 64 [TIMESTAMP_X] => 2009-06-08 10:37:17 [IBLOCK_ID] => 16 [NAME] => DataCol1 [ACTIVE] => Y [SORT] => 500 [CODE] => DataCol1 [DEFAULT_VALUE] => [PROPERTY_TYPE] => S [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => N [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => [SEARCHABLE] => N [FILTRABLE] => N [IS_REQUIRED] => N [VERSION] => 1 [USER_TYPE] => [PROPERTY_VALUE_ID] => 4169 [VALUE] => BD-R диск 20 Gb 2х FUJI в коробке [DESCRIPTION] => [VALUE_ENUM] => [VALUE_XML_ID] => [~VALUE] => BD-R диск 20 Gb 2х FUJI в коробке [~DESCRIPTION] => [~NAME] => DataCol1 [~DEFAULT_VALUE] => ) [TAB1KOL3] => Array ( [ID] => 65 [TIMESTAMP_X] => 2009-06-08 10:37:17 [IBLOCK_ID] => 16 [NAME] => TAB1KOL3 [ACTIVE] => Y [SORT] => 500 [CODE] => TAB1KOL3 [DEFAULT_VALUE] => [PROPERTY_TYPE] => S [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => N [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => [SEARCHABLE] => N [FILTRABLE] => N [IS_REQUIRED] => N [VERSION] => 1 [USER_TYPE] => [PROPERTY_VALUE_ID] => [VALUE] => [DESCRIPTION] => [VALUE_ENUM] => [VALUE_XML_ID] => [~VALUE] => [~DESCRIPTION] => [~NAME] => TAB1KOL3 [~DEFAULT_VALUE] => ) [TAB1KOL4] => Array ( [ID] => 66 [TIMESTAMP_X] => 2009-06-08 10:37:17 [IBLOCK_ID] => 16 [NAME] => TAB1KOL4 [ACTIVE] => Y [SORT] => 500 [CODE] => TAB1KOL4 [DEFAULT_VALUE] => [PROPERTY_TYPE] => S [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => N [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => [SEARCHABLE] => N [FILTRABLE] => N [IS_REQUIRED] => N [VERSION] => 1 [USER_TYPE] => [PROPERTY_VALUE_ID] => [VALUE] => [DESCRIPTION] => [VALUE_ENUM] => [VALUE_XML_ID] => [~VALUE] => [~DESCRIPTION] => [~NAME] => TAB1KOL4 [~DEFAULT_VALUE] => ) [TAB1KOL5] => Array ( [ID] => 67 [TIMESTAMP_X] => 2009-06-08 10:37:17 [IBLOCK_ID] => 16 [NAME] => TAB1KOL5 [ACTIVE] => Y [SORT] => 500 [CODE] => TAB1KOL5 [DEFAULT_VALUE] => [PROPERTY_TYPE] => S [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => N [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID] => [LINK_IBLOCK_ID] => 0 [WITH_DESCRIPTION] => [SEARCHABLE] => N [FILTRABLE] => N [IS_REQUIRED] => N [VERSION] => 1 [USER_TYPE] => [PROPERTY_VALUE_ID] => [VALUE] => [DESCRIPTION] => [VALUE_ENUM] => [VALUE_XML_ID] => [~VALUE] => [~DESCRIPTION] => [~NAME] => TAB1KOL5 [~DEFAULT_VALUE] => ) [TAB1KOL6] => Array ( [ID] => 68 [TIMESTAMP_X] => 2009-06-08 10:37:17 [IBLOCK_ID] => 16 [NAME] => TAB1KOL6 [ACTIVE] => Y [SORT] => 500 [CODE] => TAB1KOL6 [DEFAULT_VALUE] => [PROPERTY_TYPE] => S [ROW_COUNT] => 1 [COL_COUNT] => 30 [LIST_TYPE] => L [MULTIPLE] => N [XML_ID] => [FILE_TYPE] => [MULTIPLE_CNT] => 5 [TMP_ID&#93
спросил 10 Июнь, 13 от asagava (680 баллов)

2 Ответы

00 голосов
Наверно так: print_r ($arProp[TYPETABLE][VALUE]);
ответил 10 Июнь, 13 от AngryKid (420 баллов)
00 голосов
Спасибо!
ответил 20 Июнь, 13 от asagava (680 баллов)

Похожие вопросы

0 голосов
2 ответов
спросил 14 Фев, 14 от Lollipopk (660 баллов)
0 голосов
5 ответов
0 голосов
10 ответов
0 голосов
3 ответов
спросил 06 Март, 14 от Priory (100 баллов)
0 голосов
3 ответов
спросил 12 Ноя, 13 от Snezhka (2,240 баллов)