Subject Re: get foreign key
Author reynaldi81
> So, many companies do not actually delete a customer's record like
that.
> Instead, they have a flag in the record that specifies whether the
> customer is an "active" customer or not. When the user tries to
"delete"
> a customer, the software simply marks the customer "inactive" or
> "deleted", which causes their information to not show up on active
> customer lists, etc., but doesn't actually delete any information
from the
> database.


You're right. Deleting a record is a bad idea. however, i do need to
know whether the current customer record have active foreign key
references. consider this case. i have "currency_id" field in customer
table. this currency_id will be used in each sales order. if the user
change the currency_id in the customer record then i have to change
all the currency_id in sales order which reference to this customer.
so, i have to prevent the user from changing the currency id ones its
been used in sales order.