You are here

function uc_order_exists in Ubercart 6.2

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

Return TRUE if an order exists.

1 call to uc_order_exists()
uc_order_select_form_submit in uc_order/uc_order.admin.inc
Form submission handler for uc_order_select_form().

File

uc_order/uc_order.module, line 1491

Code

function uc_order_exists($order_id) {
  if (intval($order_id) <= 0) {
    return FALSE;
  }
  $result = db_query("SELECT order_id FROM {uc_orders} WHERE order_id = %d", $order_id);
  if ($order = db_fetch_object($result)) {
    return TRUE;
  }
  return FALSE;
}