You are here

function _distinct_payment_methods in Ubercart Views 6.3

_distinct_payment_methods() returns an array of DISTINCT payment methods from the uc_oders table

1 call to _distinct_payment_methods()
uc_views_handler_filter_payment_method::get_value_options in views/uc_views_handler_filter_payment_method.inc

File

views/uc_views_handler_filter_payment_method.inc, line 26
Original patch by psy Views handler: Return payment method name for payment method id

Code

function _distinct_payment_methods() {
  $methods = array();
  $result = db_query("SELECT DISTINCT payment_method AS payment_methods FROM {uc_orders}");
  while ($pm = db_fetch_object($result)) {
    $methods[$pm->payment_methods] = $pm->payment_methods;
  }
  return $methods;
}