You are here

function _uc_addresses_db_check_if_default in Ubercart Addresses 6

Same name and namespace in other branches
  1. 5.2 uc_addresses.module \_uc_addresses_db_check_if_default()
  2. 5 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.

1 call to _uc_addresses_db_check_if_default()
_uc_addresses_db_delete_address in ./uc_addresses.module
Delete an address from the database.

File

./uc_addresses.module, line 1653

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;
}