You are here

function _uc_addresses_db_check_if_default in Ubercart Addresses 5.2

Same name and namespace in other branches
  1. 5 uc_addresses.module \_uc_addresses_db_check_if_default()
  2. 6 uc_addresses.module \_uc_addresses_db_check_if_default()

Check to see if an address is the default address.

Parameters

$aid The id of the address to check.:

Return value

Returns TRUE if the address is the default address.

2 calls to _uc_addresses_db_check_if_default()
uc_addresses_delete_address_confirm in ./uc_addresses.module
Display a confirmation page before deleting an address.
_uc_addresses_db_delete_address in ./uc_addresses.module
Delete an address from the database.

File

./uc_addresses.module, line 1611

Code

function _uc_addresses_db_check_if_default($aid) {
  $count = db_result(db_query("SELECT COUNT(*) FROM {uc_addresses_defaults} WHERE " . "aid = %d", $aid));
  if ($count > 0) {
    return TRUE;
  }
  return FALSE;
}