CForumPoints::GetListEx
CDBResult CForumPoints::GetListEx( array arOrder = array("MIN_POINTS"=>"ASC"), array arFilter = array() );
The method GetListEx returns an optionally sorted and filtered list of forum ratings.
Parameters
Parameter | Description |
---|---|
arOrder | An array in the format Array(by1=>order1[, by2=>order2 [,
..]]), where:
|
arFilter | An array in the format Array("filter
field"=>"condition" [, ...]). "Filter field" can be the following:
|
Return Values
Returns an instance of the CDBResult class containing arrays with the following keys.
Key | Value |
---|---|
ID | The rating ID |
MIN_POINTS | Number of points required to obtain this rating. |
CODE | Mnemonic code. |
VOTES | Number of votes that a user with this rating can give. |
LID | The language ID. |
NAME | Name of the rating in LID. |
Example
// Sort by the number of votes in asc. order // if equal, sort by ID $arOrder = array("VOTES"=>"DESC", "ID"=>"ASC"); // Filter to select ratings with a minimum of 50 points $arFilter = array("LID"=>"ru", ">=MIN_POINTS"=>50); $db_res = CForumPoints::GetList($arOrder, $arFilter); while ($ar_res = $db_res->Fetch()) { echo $ar_res["NAME"]."-".$ar_res["VOTES"]."<br>"; }
© «Bitrix24», 2001-2024