• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/propertyindex/querybuilder.php
  • Класс: BitrixIblockPropertyIndexQueryBuilder
  • Вызов: QueryBuilder::getInSql
protected function getInSql($value, $lookup)
{
	$result = array();

	if (is_array($value))
	{
		foreach ($value as $val)
		{
			if ((string)$val <> '')
			{
				if ($lookup)
				{
					$result[] = $this->dictionary->getStringId($val, false);
				}
				else
				{
					$result[] = (int)$val;
				}
			}
		}
	}
	elseif ((string)$value <> '')
	{
		if ($lookup)
		{
			$result[] = $this->dictionary->getStringId($value, false);
		}
		else
		{
			$result[] = (int)$value;
		}
	}

	return $result;
}