CDBResult
CPath::GetList(
int parent_id = "",
string counter_type = "COUNTER_FULL_PATH",
string &by = "s_counter",
string &order = "desc",
array filter = array(),
bool &is_filtered
)
The method GetList returns a record from the table containing full
site paths and path sections ,
on daily basis, according to the criteria specified.
Parameters
Parameter
Description
parent_id
The parent path section ID (preceding to this).
counter_type
Type of counter:
COUNTER_FULL_PATH - full path click count;
COUNTER - path section click count.
by
Sorting field; the following values are possible:
s_counter - value of counter counter_type ;
s_last_page - last page of path section (applicable
if counter_type = COUNTER );
s_pages - all pages of full path (applicable if
counter_type = COUNTER_FULL_PATH ).
order
Sort order; the following values are possible:
asc - ascending;
desc - descending.
filter
Array used to filter the resulting list. The following keys can be used in the array:
PATH_ID * - the path section ID;
PATH_ID_EXACT_MATCH - if "N", entry in the PATH_ID
is sufficient (loose match);
DATE1 - the earliest date and time of the time period for
which the information is to be returned;
DATE2 - the latest date and time of the time period;
FIRST_PAGE * - first page in the path;
FIRST_PAGE_EXACT_MATCH - if "Y", the FIRST_PAGE
must match exactly (strict match);
FIRST_PAGE_SITE_ID - the ID of the site of the first
page in the path;
FIRST_PAGE_SITE_ID_EXACT_MATCH - if "N", entry in the
PATH_ID is sufficient (loose match);
FIRST_PAGE_404 - indicates the error
404 occurred on the first page (Y|N);
LAST_PAGE * - the last page of the path;
LAST_PAGE_EXACT_MATCH - if "Y", the LAST_PAGE
must match exactly (strict match);
LAST_PAGE_SITE_ID * - the ID of the site of the last
page in the path;
LAST_PAGE_SITE_ID_EXACT_MATCH - if "N", entry in the LAST_PAGE_SITE_ID
is sufficient (loose match);
LAST_PAGE_404 - indicates the error 404 occurred on
the last page (Y|N);
PAGE * - arbitrary page of the path;
PAGE_EXACT_MATCH - if "N", entry in the PAGE is
sufficient (loose match);
PAGE_SITE_ID - the ID of the site of arbitrary page;
PAGE_404 - indicates the error 404 occurred on arbitrary
page (Y|N);
ADV * - the ID of an advertising campaign whose
visitors' information is required;
ADV_EXACT_MATCH - if "N", entry in the ADV
is sufficient (loose match);
ADV_DATA_TYPE - tells to retrieve information
depending on the visit status:
P - return information on direct-hit
visitors under the specified AC;
B - return information on visitors returned
under the specified AC;
S - both returned and direct-hit visitors.
STEPS1 - minimum pages in the path;
STEPS2 - maximum pages in the path.
* - complex logic allowed.
is_filtered
If this flag contains "true" on return, the resulting list is filtered.
Structure of the returned record
The structure varies depending on the counter_type .
if counter_type is COUNTER :
Array
(
[PATH_ID] => the path section ID
[LAST_PAGE] => the last page of the path section
[LAST_PAGE_404] => [Y|N] indicates the error 404 occurred on the last page
[LAST_PAGE_SITE_ID] => the ID of the site of the last page in the path
[COUNTER] => path section click count
)
if counter_type is COUNTER_FULL_PATH :
Array
(
[PATH_ID] => the path ID
[PAGES] => all pages of full path
[COUNTER] => full path click count
)
See Also
Example
<?
// select information on full paths of visitors
// under advertising campaigns #1 or #2
$arFilter = array(
"ADV" => "1 | 2"
);
// obtain the list
$rs = CPath::GetList (
"",
"COUNTER_FULL_PATH",
($by = "s_counter"),
($order = "desc"),
$arFilter,
$is_filtered
);
// print all records
while ($ar = $rs->Fetch())
{
echo "<pre>"; print_r($ar); echo "</pre>";
}
?>