You are here

function uc_order_exists in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_order/uc_order.module \uc_order_exists()
  2. 6.2 uc_order/uc_order.module \uc_order_exists()

Returns TRUE if an order exists.

1 call to uc_order_exists()
uc_order_form_views_exposed_form_submit in uc_order/uc_order.module
Redirects if an order ID was entered in the exposed field.

File

uc_order/uc_order.module, line 1643

Code

function uc_order_exists($order_id) {
  if (intval($order_id) <= 0) {
    return FALSE;
  }
  $order = db_query("SELECT order_id FROM {uc_orders} WHERE order_id = :id", array(
    ':id' => $order_id,
  ))
    ->fetchField();
  if ($order) {
    return TRUE;
  }
  return FALSE;
}