Skip to content

Instantly share code, notes, and snippets.

@Qetbn
Last active January 20, 2019 13:57
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 Qetbn/77f960a527c800621b590d9e1d8fba02 to your computer and use it in GitHub Desktop.
Save Qetbn/77f960a527c800621b590d9e1d8fba02 to your computer and use it in GitHub Desktop.
Bitrix D7 Match Against Битрикс
<?
/**
* Пример работы с конструкцией match against в ядре d7 Битрикс
*/
use \Bitrix\Main\Entity;
use \Bitrix\Main\Application;
use \Bitrix\Main\DB;
$myIterator = MyTable::getList(array(
'runtime' => array(
new Entity\ExpressionField('1', '1'),
),
'filter' => array(
'=1' => new DB\SqlExpression('1 AND MATCH(a,b) AGAINST (?s)', $query)
)
));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment