You are here

static function CurrencyExchangerFixedRates::delete in Currency 7.2

Deletes a exchange rate.

Parameters

string $currency_code_from:

string $currency_code_to:

Return value

NULL

2 calls to CurrencyExchangerFixedRates::delete()
CurrencyExchangerFixedRatesWebTestCase::testCurrencyExchangerFixedRates in currency/tests/CurrencyConverterFixedRatesWebTestCase.test
Test currency exchange.
currency_form_currency_exchanger_fixed_rates_submit in currency/currency.module
Implements form submit callback for currency_form_currency_exchanger_fixed_rates().

File

currency/includes/CurrencyExchangerFixedRates.inc, line 113
Contains class CurrencyExchangerFixedRates.

Class

CurrencyExchangerFixedRates
Provides manually entered exchange rates.

Code

static function delete($currency_code_from, $currency_code_to) {
  $rates =& drupal_static(__CLASS__);
  db_delete('currency_exchanger_fixed_rates')
    ->condition('currency_code_from', $currency_code_from)
    ->condition('currency_code_to', $currency_code_to)
    ->execute();
  unset($rates[$currency_code_from][$currency_code_to]);
}