Subject | Re: get foreign key |
---|---|
Author | reynaldi81 |
Post date | 2007-04-10T14:41:31Z |
> So, many companies do not actually delete a customer's record likethat.
> Instead, they have a flag in the record that specifies whether the"delete"
> customer is an "active" customer or not. When the user tries to
> a customer, the software simply marks the customer "inactive" orfrom the
> "deleted", which causes their information to not show up on active
> customer lists, etc., but doesn't actually delete any information
> 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.