CAdvContract::GetWeekdayArray: Bitrix method

      
<?php 
//  CAdvContract :: GetWeekdayArray()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:509

    
public static function GetWeekdayArray($CONTRACT_ID)
    {
        
$err_mess = (CAdvContract_all::err_mess())."<br>Function: GetWeekdayArray<br>Line: ";
        global 
$DB;
        
$CONTRACT_ID intval($CONTRACT_ID);
        if (
$CONTRACT_ID<=0) return false;
        
$arrRes = array();
        
$strSql "
            SELECT DISTINCT
                C_WEEKDAY,
                C_HOUR
            FROM
                b_adv_contract_2_weekday
            WHERE
                CONTRACT_ID = 
$CONTRACT_ID
            "
;
        
$rs $DB->Query($strSqlfalse$err_mess.__LINE__);
        while (
$ar $rs->Fetch())
        {
            
$arrRes[$ar["C_WEEKDAY"]][] = $ar["C_HOUR"];
        }
        return 
$arrRes;
    }