CDBResult CPhrase::GetList( string &by = "s_id", string &order = "desc", array filter = array(), bool &is_filtered, int &total, string &group_by, int &max )
The method GetList returns a list of search phrases, optionally grouped by search phrase or search engine.
Parameter | Description |
---|---|
by | Sorting field. Depending on how the list is grouped, possible values
of this parameters may vary.
|
order | Sort order; the following values are possible:
|
filter | Array used to filter the resulting list. The following keys can be
used in the array:
|
is_filtered | If this variable contains "true" on return, the resulting list is filtered. |
total | Total number of search phrases. |
group_by | How the list of search phrases is grouped. Possible values:
|
max | Number of hits using the most popular search phrase. |
The structure of the returned record varies depending on the grouping.
Array ( [PHRASE] => search phrase [QUANTITY] => number of visits using this search phrase [PERCENT] => percentage of total visits by various search phrase )
Array ( [SEARCHER_ID] => the ID of the search engine [SEARCHER_NAME] => name of the search engine [QUANTITY] => number of visits using this search engine [PERCENT] => percentage of total visits using this search engine [AVERAGE_HITS] => average number of hits made by visitors using a search engine )
Array ( [ID] => the ID of the record [PHRASE] => search phrase [DATE_HIT] => time [SESSION_ID] => the session ID [REFERER_ID] => the ID of the record from the referring page table [SEARCHER_ID] => the ID of the search engine [SEARCHER_NAME] => name of the search engine [URL_TO] => target page [URL_TO_404] => indicates the error 404 occurred on the target page (Y|N); [SITE_ID] => the ID of the target site )
<? // we want only search phrases // used for searches within the site // using the internal search $arFilter = array( "SEARCHER_ID" => 1 ); // obtain the list of records $rs = CPhrase::GetList( ($by = "s_id"), ($order = "desc"), $arFilter, $is_filtered, $total, $group_by, $max ); // print all records while ($ar = $rs->Fetch()) { echo "<pre>"; print_r($ar); echo "</pre>"; } ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |