GetList
CDBResult CBlogUser::GetList( array arOrder = Array("ID"=>"DESC"), array arFilter = Array(), bool arGroupBy = false, bool arNavStartParams = false, array arSelectFields = Array() );
Returns list of blog users by the arFilter, sorted in the arOrder. Static method.
Method parameters
Parameter | Description |
---|---|
arOrder |
Array for sorting of result. The array of the array("sorting field"=>"sorting direction" [, ...]) type
Field for sorting can have the following values:
|
arFilter |
Array of the array("filtered field"=>"filter value" [, ...]) type.
Filtered field can have the following values:
"filter values" - single value or an array. Optional. By default, records are not filtered. |
arGroupBy | Array of fields, by which the records are filtered. The array has the following structure:
array("field_name1", "aggregate_function2" => "field_name2", ...)Any field can be specified as "field_nameN". The following can be specified as aggregate function:
Optional. By default - false - means that the result will not be grouped. |
arNavStartParams | Array of selection parameters. Can contain the following keys:
|
arSelectFields | Array of records, which will be returned by the method. Only those fields that are needed can be specified. If there is a "*" value in the array - all available fields will be returned. Optional. By default - empty array() - means that all fields of the request's main table will be returned. |
Returned value
CDBResult object is returned.See Also
Examples of use
<? // select all users - friends за the blog with ID 1 $arOrder = Array( "USER_NAME" => "ASC", "ID" => "ASC" ); $arFilter = Array( "GROUP_BLOG_ID" => 1 ); $arSelectedFields = Array("ID", "USER_ID", "ALIAS", "USER_LOGIN", "USER_NAME", "USER_LAST_NAME"); $dbUsers = CBlogUser::GetList( $arOrder, $arFilter, false, false $arSelectedFields ); while ($arUsers = $dbUsers->Fetch()) { print_r($arUsers); } ?>
© «Bitrix24», 2001-2024