CDBResult CCurrencyRates::GetList( string &by, string &order, array arFilter = Array() );
The method GetList returns the sorted list of exchange rates satisfying the specified filter.
Parameter | Description |
---|---|
by | Variable containing the name of the sorting field. The following values
are possible:
|
order | Variable containing sort direction. The following values are possible:
|
arFilter | Record filter in the form of an associated array in which keys are the
names of filtered fields and values are the filter conditions. The following filter fields are possible:
|
An instance of the CDBResult class containing the records with the following keys.
Key | Description |
---|---|
ID | The rate ID. |
CURRENCY | The currency identifier. |
DATE_RATE | The date for which the rate is set. |
RATE_CNT | The number of currency units used to define the rate of exchange (for example, if CYP 10 equal to USD 21.58, 10 is the number of currency units). |
RATE | The default rate of exchange. (One of currencies within a site must equal to 1. Such currency is called a base currency. Other currencies are defined relative to the base currency.) |
<? // Display all USD rates, sorted by date $arFilter = array( "CURRENCY" => "USD" ); $by = "date"; $order = "desc"; $db_rate = CCurrencyRates::GetList($by, $order, $arFilter); while($ar_rate = $db_rate->Fetch()) { echo $ar_rate["RATE"]."<br>"; } ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |