+7 (495) 268-06-93
[Bitrix\Main\DB\SqlQueryException] 
Mysql query error: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR `iblock_element`.`SORT` > 0
)
ORDER BY `iblock_element`.`ACTIVE_FROM` ASC, `i' at line 40 (400)
SELECT 
	`iblock_element`.`ID` AS `ID`,
	`iblock_element`.`TIMESTAMP_X` AS `TIMESTAMP_X`,
	`iblock_element`.`MODIFIED_BY` AS `MODIFIED_BY`,
	`iblock_element`.`DATE_CREATE` AS `DATE_CREATE`,
	`iblock_element`.`CREATED_BY` AS `CREATED_BY`,
	`iblock_element`.`IBLOCK_ID` AS `IBLOCK_ID`,
	`iblock_element`.`IBLOCK_SECTION_ID` AS `IBLOCK_SECTION_ID`,
	`iblock_element`.`ACTIVE` AS `ACTIVE`,
	`iblock_element`.`ACTIVE_FROM` AS `ACTIVE_FROM`,
	`iblock_element`.`ACTIVE_TO` AS `ACTIVE_TO`,
	`iblock_element`.`SORT` AS `SORT`,
	`iblock_element`.`NAME` AS `NAME`,
	`iblock_element`.`PREVIEW_PICTURE` AS `PREVIEW_PICTURE`,
	`iblock_element`.`PREVIEW_TEXT` AS `PREVIEW_TEXT`,
	`iblock_element`.`PREVIEW_TEXT_TYPE` AS `PREVIEW_TEXT_TYPE`,
	`iblock_element`.`DETAIL_PICTURE` AS `DETAIL_PICTURE`,
	`iblock_element`.`DETAIL_TEXT` AS `DETAIL_TEXT`,
	`iblock_element`.`DETAIL_TEXT_TYPE` AS `DETAIL_TEXT_TYPE`,
	`iblock_element`.`SEARCHABLE_CONTENT` AS `SEARCHABLE_CONTENT`,
	`iblock_element`.`WF_STATUS_ID` AS `WF_STATUS_ID`,
	`iblock_element`.`WF_PARENT_ELEMENT_ID` AS `WF_PARENT_ELEMENT_ID`,
	`iblock_element`.`WF_NEW` AS `WF_NEW`,
	`iblock_element`.`WF_LOCKED_BY` AS `WF_LOCKED_BY`,
	`iblock_element`.`WF_DATE_LOCK` AS `WF_DATE_LOCK`,
	`iblock_element`.`WF_COMMENTS` AS `WF_COMMENTS`,
	`iblock_element`.`IN_SECTIONS` AS `IN_SECTIONS`,
	`iblock_element`.`XML_ID` AS `XML_ID`,
	`iblock_element`.`CODE` AS `CODE`,
	`iblock_element`.`TAGS` AS `TAGS`,
	`iblock_element`.`TMP_ID` AS `TMP_ID`,
	`iblock_element`.`SHOW_COUNTER` AS `SHOW_COUNTER`,
	`iblock_element`.`SHOW_COUNTER_START` AS `SHOW_COUNTER_START`
FROM `b_iblock_element` `iblock_element` 

WHERE `iblock_element`.`IBLOCK_ID` = 1
AND UPPER(`iblock_element`.`ACTIVE`) like upper('Y')
AND (
	`iblock_element`.`ACTIVE_FROM` > 
	OR `iblock_element`.`SORT` > 0
)
ORDER BY `iblock_element`.`ACTIVE_FROM` ASC, `iblock_element`.`SORT` DESC, `iblock_element`.`ID` ASC
LIMIT 0, 2

/home/u480707/vilon.ru/www/bitrix/modules/main/lib/db/mysqliconnection.php:137
#0: Bitrix\Main\DB\MysqliConnection->queryInternal(string, array, NULL)
	/home/u480707/vilon.ru/www/bitrix/modules/main/lib/db/connection.php:329
#1: Bitrix\Main\DB\Connection->query(string)
	/home/u480707/vilon.ru/www/bitrix/modules/main/lib/entity/query.php:1821
#2: Bitrix\Main\Entity\Query->query(string)
	/home/u480707/vilon.ru/www/bitrix/modules/main/lib/entity/query.php:454
#3: Bitrix\Main\Entity\Query->exec()
	/home/u480707/vilon.ru/www/bitrix/modules/main/lib/entity/datamanager.php:242
#4: Bitrix\Main\Entity\DataManager::getList(array)
	/home/u480707/vilon.ru/www/bitrix/templates/vilon-store/components/bitrix/news/vilon/detail.php:91
#5: include(string)
	/home/u480707/vilon.ru/www/bitrix/modules/main/classes/general/component_template.php:714
#6: CBitrixComponentTemplate->__IncludePHPTemplate(array, array, string)
	/home/u480707/vilon.ru/www/bitrix/modules/main/classes/general/component_template.php:806
#7: CBitrixComponentTemplate->IncludeTemplate(array)
	/home/u480707/vilon.ru/www/bitrix/modules/main/classes/general/component.php:681
#8: CBitrixComponent->showComponentTemplate()
	/home/u480707/vilon.ru/www/bitrix/modules/main/classes/general/component.php:629
#9: CBitrixComponent->includeComponentTemplate(string)
	/home/u480707/vilon.ru/www/bitrix/components/bitrix/news/component.php:209
#10: include(string)
	/home/u480707/vilon.ru/www/bitrix/modules/main/classes/general/component.php:548
#11: CBitrixComponent->__includeComponent()
	/home/u480707/vilon.ru/www/bitrix/modules/main/classes/general/component.php:600
#12: CBitrixComponent->includeComponent(string, array, boolean)
	/home/u480707/vilon.ru/www/bitrix/modules/main/classes/general/main.php:1035
#13: CAllMain->IncludeComponent(string, string, array, boolean)
	/home/u480707/vilon.ru/www/kompaniya/novosti/index.php:127
#14: include_once(string)
	/home/u480707/vilon.ru/www/bitrix/modules/main/include/urlrewrite.php:159
#15: include_once(string)
	/home/u480707/vilon.ru/www/bitrix/urlrewrite.php:2