The ID of the advertising campaign whose parameters are to be
returned.
by
Sorting field. Possible values:
s_date - date.
order
Sort order. Possible values:
asc - ascending;
desc - descending.
max_min
Reference to an array containing minimum and maximum dates of the
returned list. The array has the following structure:
Array
(
[DATE_FIRST] => minimum date
[MIN_DAY] => day of the minimum date (1-31)
[MIN_MONTH] => month of the minimum date (1-12)
[MIN_YEAR] => year of the minimum date
[DATE_LAST] => maximum date
[MAX_DAY] => day of the maximum date (1-31)
[MAX_MONTH] => month of the maximum date (1-12)
[MAX_YEAR] => year of the maximum date
)
filter
Array used to filter the resulting list. The following keys are
possible in this array:
DATE_1 - date "from";
DATE_2 - date "till".
Structure of the returned record
Array
(
[DATE_STAT] => date
[DAY] => day (1-31)
[MONTH] => month (1-12)
[YEAR] => year
[GUESTS] => number of the direct hit visitors
[NEW_GUESTS] => number of the new direct hit visitors
[FAVORITES] => number of the direct hit visitors who added the site to Favorites
[C_HOSTS] => number of the direct hit hosts
[SESSIONS] => number of the direct hit sessions
[HITS] => number of the direct hits
[GUESTS_BACK] => number of the returned visitors
[FAVORITES_BACK] => number of the returned visitors who added the site to Favorites
[HOSTS_BACK] => number of the hosts on return
[SESSIONS_BACK] => number of the sessions on return
[HITS_BACK] => number of the hits on return
)
<?
$adv_id = 1;
// set the filter to match the December of 2005
$arFilter = array(
"DATE1" => "01.12.2005",
"DATE2" => "31.12.2005"
);
// obtain the set of records
$rs = CAdv::GetDynamicList(
$adv_id,
($by="s_date"),
($order="desc"),
$arMaxMin,
$arFilter,
$is_filtered
);
// print the array containing minimum and maximum dates
echo "<pre>"; print_r($arMaxMin); echo "</pre>";
// print all the records
while ($ar = $rs->Fetch())
{
echo "<pre>"; print_r($ar); echo "</pre>";
}
?>