You are here

function uc_order_exists in Ubercart 5

Same name and namespace in other branches
  1. 6.2 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.module

File

uc_order/uc_order.module, line 2816

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 (db_num_rows($result) == 0) {
    return FALSE;
  }
  return TRUE;
}