Created
July 10, 2020 14:55
-
-
Save MasterHans/4906d481e488e754322cd140643cb29c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$letter = []; | |
$sQuery = ''; | |
$sQuery .= 'SELECT DISTINCT '; | |
$sQuery .= 'UPPER(LEFT(LTRIM(NAME), 1)) AS LETTER '; | |
//$sQuery .= 'UPPER(NAME) AS LETTER '; | |
$sQuery .= 'FROM b_iblock_element BE '; | |
$sQuery .= 'WHERE BE.IBLOCK_ID = '.CONTENT_BREND_IB_ID.' AND BE.ACTIVE = "Y" AND BE.WF_STATUS_ID = 1 AND BE.WF_PARENT_ELEMENT_ID IS NULL'; | |
$sQuery .= ' ORDER BY LETTER ASC '; | |
$rsItems = $GLOBALS['DB']->Query($sQuery, false, __LINE__); | |
while($arItem = $rsItems->GetNext(false, false)) { | |
$letter[] = $arItem['LETTER']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment