Re: Do i need triggers for this?
| From: | Justin French | Date: | Tue, 26 Nov 2002 04:35:18 +0000 |
| Subject: | Re: Do i need triggers for this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126042@lists.php.net to get a copy of this message | ||
on 26/11/02 3:46 PM, Faisal Abdullah (faisal@magnifix.com.my) wrote:
> Lets say I have a table called 'employees', and another table called
> 'training_history'.
>
> Lets say I need to delete an employee, I would also have to delete his
> record in the 'training_history' table.
The employee would (I assume) have a unique id/key... presumably this key
relates his/her information in the training table.
employee:
id/first/last/email
training
employeeid/something/something
So, when you delete the employee with id '15', also delete any training
records with the employeeID of '15'.
So, yes, I'd do this at an application level... although I have no idea what
triggers are :)
Justin French
--------------------
http://Indent.com.au
Web Development &
Graphic Design
--------------------