CDBResult CStatEventType::GetList( string &by = "s_today_counter", string &order = "desc", array filter = array(), bool &is_filtered, mixed limit = false )
The method GetList returns a list of event types.
Parameter | Description |
---|---|
by | Sorting field; possible values:
|
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 flag contains "true" on return, the resulting list is filtered. |
limit | Maximum number of event types to return. If set to false, the number of event types will be limited to that specified in the parameter Maximum number of records displayed in tables in the Statistics module settings. |
Depending on how the list is grouped, the returned record structure may vary.
Array ( [EVENT1] => the event1 event type identifier [DATE_ENTER] => the date of the first event whose type equals to the event1 identifier [DATE_LAST] => the date of the last event whose type equals to the event1 identifier [TOTAL_COUNTER] => total number of events [TODAY_COUNTER] => total number of events for today [YESTERDAY_COUNTER] => total number of events for yesterday [B_YESTERDAY_COUNTER] => total number of events for the day before yesterday [PERIOD_COUNTER] => total number of events for the time period(filter[DATE1_PERIOD], filter[DATE2_PERIOD]) [TOTAL_MONEY] => total amount of money [TODAY_MONEY] => total amount of money for today [YESTERDAY_MONEY] => total amount of money for yesterday [B_YESTERDAY_MONEY] => total amount of money for the day before yesterday [PERIOD_MONEY] => total amount of money for the time period(filter[DATE1_PERIOD], filter[DATE2_PERIOD]) [CURRENCY] => three-character identifier of the amount currency )
Array ( [EVENT2] => the event2 event type identifier; [DATE_ENTER] => the date of the first event whose type equals to the event2 identifier [DATE_LAST] => the date of the last event whose type equals to the event2 identifier [TOTAL_COUNTER] => total number of events [TODAY_COUNTER] => total number of events for today [YESTERDAY_COUNTER] => total number of events for yesterday [B_YESTERDAY_COUNTER] => total number of events for the day before yesterday [PERIOD_COUNTER] => total number of events for the time period(filter[DATE1_PERIOD], filter[DATE2_PERIOD]) [TOTAL_MONEY] => total amount of money [TODAY_MONEY] => total amount of money for today [YESTERDAY_MONEY] => total amount of money for yesterday [B_YESTERDAY_MONEY] => total amount of money for the day before yesterday [PERIOD_MONEY] => total amount of money for the time period(filter[DATE1_PERIOD], filter[DATE2_PERIOD]) [CURRENCY] => three-character identifier of the amount currency )
Array ( [ID] => the event type ID [EVENT1] => the event1 event type identifier [EVENT2] => the event2 event type identifier [DIAGRAM_DEFAULT] => flag: whether to include this event type in charts and graphs by default [Y/N]; [NAME] => the event type name [EVENT] => event1 / event2, the event type name (if specified) [DESCRIPTION] => the event type description [TOTAL_COUNTER] => total number of events of this type [TODAY_COUNTER] => total number of events of this type for today [YESTERDAY_COUNTER] => total number of events of this type for yesterday [B_YESTERDAY_COUNTER] => total number of events of this type for the day before yesterday [PERIOD_COUNTER] => total number of events of this type for the time period(filter[DATE1_PERIOD], filter[DATE2_PERIOD]) [TOTAL_MONEY] => total amount of money for this type of event [TODAY_MONEY] => total amount of money for this type of event for today [YESTERDAY_MONEY] => total amount of money for this type of event for yesterday [B_YESTERDAY_MONEY] => total amount of money for this type of event for the day yesterday [PERIOD_MONEY] => total amount of money for this type of event for the time period(filter[DATE1_PERIOD], filter[DATE2_PERIOD]) [CURRENCY] => three-character identifier of the amount currency )
<? // obtain information only on those event types // whose event1 = "download" // also obtain extra data on December 2005 $arFilter = array( "DATE1_PERIOD" => "01.12.2005", "DATE2_PERIOD" => "31.12.2005", "EVENT1" => "download" ); // obtain the list of records $rs = CStatEventType::GetList( ($by = "s_today_counter"), ($order = "desc"), $arFilter, $is_filtered ); // print all records while ($ar = $rs->Fetch()) { echo "<pre>"; print_r($ar); echo "</pre>"; } ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |