CAdvBanner :: GetDynamicList_SQL: Bitrix method

      
<?php 
//  CAdvBanner :: GetDynamicList_SQL()
//  /dist/bitrix/modules/advertising/classes/mysql/advertising.php:975

    
public static function GetDynamicList_SQL($strSqlSearch)
    {
        global 
$DB;
        
$strSql "
            SELECT
                "
.$DB->DateToCharFunction("D.DATE_STAT","SHORT")."        DATE_STAT,
                DAYOFMONTH(D.DATE_STAT)                                    DAY,
                MONTH(D.DATE_STAT)                                        MONTH,
                YEAR(D.DATE_STAT)                                        YEAR,
                D.SHOW_COUNT,
                D.CLICK_COUNT,
                D.VISITOR_COUNT,
                D.BANNER_ID,
                B.CONTRACT_ID,
                B.GROUP_SID,
                C.NAME                                                    CONTRACT_NAME,
                C.SORT                                                    CONTRACT_SORT,
                B.NAME                                                    BANNER_NAME,
                B.TYPE_SID                                                BANNER_TYPE_SID
            FROM
                b_adv_banner_2_day D
            INNER JOIN b_adv_banner B ON (D.BANNER_ID = B.ID)
            INNER JOIN b_adv_contract C ON (B.CONTRACT_ID = C.ID)
            WHERE
            
$strSqlSearch
            ORDER BY
                D.DATE_STAT, B.CONTRACT_ID, B.GROUP_SID, D.BANNER_ID
            "
;
        return 
$strSql;
    }