Skip to content

Instantly share code, notes, and snippets.

@HueJack
Created November 7, 2018 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HueJack/edf132d30457c81fda3a06c618db69dc to your computer and use it in GitHub Desktop.
Save HueJack/edf132d30457c81fda3a06c618db69dc to your computer and use it in GitHub Desktop.
Формирование запроса с использованием join
\Bitrix\Sale\Internals\UserPropsTable::query()
->setSelect(['ID', 'NAME', 'PROP_VALUE.*'])
->setFilter(['USER_ID' => $USER->GetID(), 'PROP_VALUE.ORDER_PROPS_ID' => 7, 'PROP_VALUE.VALUE' => 234234234])
->registerRuntimeField('PROP_VALUE', [
'data_type' => \Bitrix\Sale\Internals\UserPropsValueTable::class,
'reference' => array('=this.ID' => 'ref.USER_PROPS_ID'),
'join_type' => "LEFT"
])->exec()->fetchAll();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment