GetList
Description and parameters
CDBResult CSaleAuxiliary::GetList( array arOrder = array(), array arFilter = array(), array arGroupBy = false, array arNavStartParams = false, array arSelectFields = array() );
Method returns records with information on temporary access according to its parameters. Non-static method.
Call parameters
Parameter | Description |
---|---|
arOrder | Array with sorted resulting records. Array has the following appearance:
array( "field_name1" => "sorting_direction1", "field_name2" => "sorting_direction2", . . . )Any field can be set as "field_nameN" with information on temporary access, and "sorting_directionN" can have values "ASC" (by ascension) and "DESC" (by descension). In case the array with sorting has several elements, the resulting set is sorted sequentially by each element (i. e. first sorts by the first element, then the result is sorted by the second and etc.). Default value - empty array() - indicates that result won't be sorted. |
arFilter | Array for sorting record information on temporary access. Array has the following appearance:
array( "[modifier1][operator1]field_name1" => "value1", "[modifier2][operator2]field_name2" => "value2", . . . )Returns records that satisfy the filter. The records that don't satisfy filter conditions are dismissed. The following modifiers are permitted:
Filter example: array("USER_ID" => 150)This filter indicates "select all records with USER_ID value (user code) is 150". Default value - empty array() - indicates that result won't be filtered. |
arGroupBy | Array with fields used to group the records on temporary access. Array looks as follows:
array("field_name1", "group_function2" => "field_name2", . . .)The "field_nameN" can have any field with information on temporary access. The following values can be indicated as the grouping function:
Default value - false - indicates that the result won't be grouped. |
arNavStartParams | Array with retrieved selection parameters. Can contain the following keys:
|
arSelectFields | Array of record fields to be returned by the method. Only necessary fields can be indicated. If the array contains the value "*", returns all the available fields. Default value - empty array array() - indicates that all fields of the query's main table will be returned. |
Returned values
Returns CDBResult class object, containing set of associative parameters with information on temporary access with keys as follows:
- ID - record code;
- USER_ID - user code;
- ITEM - resource, with permitted access;
- ITEM_MD5 - resource identifier (string, with single resource identification);
- TIMESTAMP_X - timestamp;
- DATE_INSERT - date of inserted record.
When passing an empty array as arGroupBy parameter, the method returns number of records, satisfying the filter.
© «Bitrix24», 2001-2024