Bitrix Site Manager

CAdv::GetByID

CDBResult
CAdv::GetByID(
 int adv_id
)

The method GetByID returns settings of an advertising campaign.

Parameters

Parameter Description
adv_id The ID of the advertising campaign whose parameters are to be returned.

Structure of the returned record

Array
(
    [ID] => ID
    [REFERER1] => the ID of referer1
    [REFERER2] => the ID of referer2
    [DATE_FIRST] => date of the first direct hit
    [DATE_LAST] => date of the late direct hit or return
    [COST] => expenses
    [REVENUE] => profit
    [DESCRIPTION] => description
    [PRIORITY] => priority
    [EVENTS_VIEW] => event list display modes, possible values:
        link - as a link to the list
        list - as a list
        event1 - grouped by event1
        event2 - grouped by event2
    [GUESTS] => total number of the direct hit visitors
    [NEW_GUESTS] => total number of the new direct hit visitors
    [FAVORITES] => total number of the direct hit visitors who added the site to Favorites
    [C_HOSTS] => total number of the direct hit hosts
    [SESSIONS] => total number of the direct hit sessions
    [HITS] => total number of the direct hits
    [GUESTS_BACK] => total number of the returned visitors
    [FAVORITES_BACK] => total number of the returned visitors who added the site to Favorites
    [HOSTS_BACK] => total number of the hosts on return
    [SESSIONS_BACK] => total number of the sessions on return
    [HITS_BACK] => total number of the hits on return
)

See Also

Example



<?
$adv_id = 1;
if ($rs = CAdv::GetByID($adv_id))
{
    $ar = $rs->Fetch();
    // print the advertising campaign settings
    echo "<pre>"; print_r($ar); echo "</pre>";
}
?>