SELECT DISTINCT BS.*, B.LIST_PAGE_URL, B.SECTION_PAGE_URL, B.IBLOCK_TYPE_ID, B.CODE as IBLOCK_CODE, B.XML_ID as IBLOCK_EXTERNAL_ID, BS.XML_ID as EXTERNAL_ID, DATE_FORMAT(BS.TIMESTAMP_X, '%d.%m.%Y %H:%i:%s') as TIMESTAMP_X, DATE_FORMAT(BS.DATE_CREATE, '%d.%m.%Y %H:%i:%s') as DATE_CREATE
FROM
b_iblock_section BS
INNER JOIN b_iblock B ON BS.IBLOCK_ID = B.ID
LEFT JOIN b_iblock_group IBG ON IBG.IBLOCK_ID=B.ID
WHERE
1=1 AND ((((BS.IBLOCK_ID = '8')))) AND ((((BS.ACTIVE='Y')))) AND (BS.LEFT_MARGIN >=1) AND ((((B.IBLOCK_TYPE_ID LIKE 'info')))) AND ((((B.ID = '8'))))
ORDER BY
BS.LEFT_MARGIN asc |